The following examples show how qualifiers can be used in the tc:loop tag.
Example 1: |
<tc:loop select="AssigneeList" qualifier="Type_TreePosition=CLAM_SPRV"> <tc:data select="User/Contact/FirstName" /> <tc:data select="User/Contact/Name" /> <tc:data select="User/Contact/DefaultPhone/ PhoneString" /> </tc:loop> |
In the example above, the qualifier attribute takes the unique code of the object and the tree position of the selected item within the sub-object as its value. CLAM is the unique code of the selected object, Claim, and SPRV is the tree position of the project assignee. The data retrieved by TeamConnect is the first and last name, and phone number of only the type of assignee (specifically, assignee role) that is specified by the qualifier attribute.
Example 2: |
<tc:loop select="DetailList" qualifier="Category_Parent_Name=Claim"> <tc:data select="Category/Name" /> </tc:loop> |
This is an example of using a text value as a qualifier. In this example, which is for a custom object named Claim, the qualifier attribute makes the Document Generator retrieve only those categories added to the record that have Claim as the parent category. This property means that any categories on the level directly beneath Root which are added to the record are retrieved. However, the category Claim itself is not retrieved.
Also, any categories added to the record that are on the second, third, fourth levels, and so on, beneath the Root are not retrieved, because their Parent category is not Claim. The data being retrieved with the tc:data tag is the name of each category that meets the qualifier.
This property is useful when you want the generated document to include only the major categories of a record and not all of the sub-categories.
Example 3: |
<tc:loop select="PhoneList" qualifier="Type_TreePosition=PHON_BUS1"> <tc:data select="PhoneString" /> </tc:loop> |
In the previous example, the qualifier attribute makes the Document Generator retrieve only the phone numbers for a contact that are of the type Business 1 (BUS1). The tc:data tag retrieves the actual phone number.
Notice that the value for the qualifier attribute is the unique code of the lookup table (PHON), followed by an underscore (_) and the tree position of the phone type being retrieved (BUS1).