Specialized Administration > Tailoring Business Objects > Object Initialization Rules Administration > Working with Object Initialization Rules > Rule Algorithms > Conditional Logic Algorithms
  
Conditional Logic Algorithms
To qualify when default values are set or constraints used for Windchill attributes in object initialization rules, you can integrate the use of conditional logic algorithms into both the AttrValue and AttrConstraint tag syntax.
PTC provides the following types of conditional logic algorithms:
Test Algorithms - always return either a TRUE or FALSE value.
Branch Algorithms - always branch between the supplied Arg elements.
* 
Values for any attributes used within constraint algorithms for conditional logic evaluation purposes must be set before the field used for the attribute specified in the AttrConstraint tag is displayed. For example, if fields for the document template and the document number appear on the same wizard step that is used to create a document, then the value of the document template cannot be used to determine the generation scheme for number.
Also, any attribute used within default value algorithms for conditional logic evaluation purposes must be set before the object initialization code executes.
* 
The use of conditional logic requires that you understand the sequence of how values are set for attributes through the user interface. For example, current user interface implementation for selecting folders does not support the use of conditional logic for the folder.id attribute.
Following the descriptions of out-of-the-box test and branch algorithms is a conditional logic algorithm example.