Show/Hide Toolbars

The tc:loop tag is used to navigate to sub-objects of the current object. The tc:loop tag does not retrieve any data by itself. It only specifies the sub-object from which TeamConnect will retrieve data. Essentially, it navigates from the current object to the sub-object that you specify.

When you close the tc:loop tag, you return to the object to which the sub-object belongs. However, while inside the tc:loop tag, you can continue to navigate to other objects by nesting additional tags. You can also nest tc:loop within other tags as needed, such as tc:filter or tc:conditional.

To retrieve data from system fields of the sub-object, you must nest the tc:data tag within the tc:loop tag.

When nesting the tc:data tag within the tc:loop tag, the following data can be retrieved:

Data from all instances of a sub-object.

For example, you may want to include all the names and phone numbers of all the Assignees for an auto claim. For details, see Retrieving Data from All Instances of Sub-object.

Data from only instances of the sub-object that match a criterion that you define.

For example, you may want to include only the name and phone number of Assignees with a certain role, such as Supervisor. For details, see Retrieving Data with tc:loop Using Qualifiers.

Automatically Selected vs. User-Selected Sub-objects

The tc:loop tag is useful for selecting instances of a sub-object from which data should be retrieved automatically in a document template. However, there are some cases where it is necessary for the user who is generating a document to select a sub-object from which to retrieve data.

For example, your document template may require that the user select an assignee, address, or phone number. In order to provide the user with a list of instances of a sub-object, you would not use tc:loop. Instead, you would use tc:filter to define a filter page where the user would make the appropriate selection. You will learn more about how to do this in Filters for Sub-objects and Single Records.