You may want users to select one or more sub-objects from which to retrieve data in a document. For example, you may want the user to select one address from the list of addresses belonging to a contact. In order to provide a filter page where the user selects a sub-object, use the test attribute in the tc:filter tag.
The test attribute can also identify a single record that is selected in a system field. Although you normally do not need a filter page that only gives the user one item to select, this becomes necessary when using tc:filter tags to navigate to the list of related records or sub-objects you want to provide to the user. For example, you may need a filter page where the user selects an Involved (related object) of the parent custom object record Policy (a single record). You will learn more about this in Main Filters and Sub-Filters.
The test tag attribute accepts a path as its value. The path must meet the following requirements:
•It must be constructed of TeamConnect object attributes, according to the relationships between object attributes found in the Object Model.
•It must end with an object attribute that identifies either a single record selected in a system field of a record, or a sub-object list.
The following table describes how to use the test tag attribute for tc:filter. Use this tag attribute in addition to the basic tag attributes noted in the tc:filter Tag Attributes table.
test Tag Attribute of tc:filter
Tag attribute |
Possible attribute value |
Description |
test |
"AttributePath" (attributes separated by underscores _ ) |
Use test to specify the path of object attributes separated by underscores (_) that identifies the object attribute that you want the user to select in the filter page. The object attribute identified by the path may be one of the following types: •A sub-object from a sub-object list. Tips: oSub-object attributes contain the word "List" in the name of the object attribute (such as AssigneeList, AddressList, or LineItemList). oObject Model: Read This First (and the additional reference tables it points to) describes all of the sub-objects for each main TeamConnect object. •An object attribute that identifies a single record (such as the Parent or Contact for a custom object record). Displaying a single record in a filter page is useful when you need to navigate to a list you want the user to view. For more details about this scenario, see Single-Option Filters. Tip: An object attribute that identifies a single record has the data type "object" in this document. |
If you are identifying a sub-object list with the test attribute, the attribute and value might look like any of the following examples:
•test="AssigneeList" (in a custom object)
•test="AddressList" (in a contact)
•test="Contact_AddressList" (in a contact-centric custom object)
•test="Project_Contact_PhoneList" (in an expense record, to its project's contact-centric field's phone numbers)
•test="Parent_AssigneeList" (in a child custom object, to its parent's assignees)
If you are identifying a single record that is selected in a system field with the test attribute, the attribute and value could look like any of the following examples:
•test="Parent" (in a child custom object)
•test="Parent_Contact" (in a child custom object, to its contact-centric parent)
•test="Contact" (in a custom object, to the contact in its contact-centric field)
•test="Project" (in an expense record)
Header |
<tc:filter name="UserSelectedAssignee" test="AssigneeList" displayString="User/Contact/FirstName;User/Contact/Name;Type/Name" displayFormat="* * - *" label="Please select an assignee." /> |
Content |
<tc:filter select="UserSelectedAssignee"> <tc:data select="User/Contact/FirstName" /> <tc:data select="User/Contact/Name" /> </tc:filter> |
In the TeamConnect, the filter defined in the header tests the AssigneeList sub-object of the main object and displays a list of assignees in the filter page. In the content section, the first and last name of the assignee is generated in the document.
Header |
<tc:filter name="SelectedAddress" test="Contact_AddressList" label="Please select the address of the Insured to which this letter should be mailed." displayString="Street;City;State;PostalCode" displayFormat="* *, * *" /> |
Content |
<tc:filter select="SelectedAddress"> <tc:data select="Street" /> <tc:data select="City" />, <tc:data select="State"/> <tc:data select="PostalCode" /> </tc:filter> |
In the TeamConnect, the test attribute of tc:filter in the header identifies the list of addresses for the contact selected in the contact-centric field (Insured) of the main object record. In the content section, the address selected by the user appears in the generated document.
Header |
<tc:filter name="ParentPolicy" test="Parent" label="Please select the parent Policy below and click Next." displayString="Name" displayFormat="*" usedBy="1" /> |
In this example of a header only, the filter identifies the Policy selected as the parent in the main object record (the child Claim). This filter will be useful for then allowing the user to select the Policy's Involved parties in a subsequent filter. You will see how this is done in Single-Option Filters.