Specialized Administration > Tailoring Business Objects > Object Initialization Rules Administration > Working with Object Initialization Rules > Specifying Rules > AttrValue Tag Syntax
  
AttrValue Tag Syntax
An XML document used for a rule can contain one or more AttrValue tags. Always nest the AttrValue tag within an AttributeValues tag.
Use the AttrValue tag to set the default value for a Windchill attribute. The value set is only used when the user interface does not set a value. The rules that are available for setting a default value for a Windchill attribute are determined by the object type and context hierarchies that are in place. For details on how rules use these hierarchies, see Merging Rules to Create a Composite Rule.
The AttrValue tag syntax is as follows:
<AttrValue id="Windchill_object_attribute"
algorithm="default_value_algorithm">
algorithm_arguments
</AttrValue>
where algorithm_arguments shown in the AttrValue tag syntax contains the arguments that are required by the algorithm. Each out-of-the-box algorithm requires zero, one, or more arguments. For details on the supported algorithms and their required arguments, see Default Value Algorithms.
For example, use the following XML nested in the AttributeValues tag for the wt.doc.WTDocument object type to identify the default document folder path:
<AttrValue id="folder.id"
algorithm="com.ptc.core.foundation.folder.server.impl.FolderPathAttributeAlgorithm">
<Arg>/Default</Arg>
</AttrValue>
Additionally, you can include optional XML attributes in the AttrValue tag to do the following:
Set the object attribute value specified as the absolute value to use in the composite rule.
Ignore the specified setting for the object attribute value when the value is inherited from the parent context.
For information about the supported attributes that can be included in the AttrValue tag, see Using Supported Types and Attributes.