Using Triggers Within Repeater Structures

While a standard document trigger can determine whether content will be displayed or not, it will not function for fields within a grid.  To filter the contents of a table using a trigger, a Repeater Trigger must be used.

 

Once the repeating section of the document has been set up, either as a table or as text, the trigger can be added anywhere between the beginning and end of the table markers.

 

Example:  The repeater for a grid named “Table1” containing the fields “Field1”, “Field2”, and “Field3” would show as follows:

<<TableStart:Table1>>  <<Field1>>  <<Field2>>  <<Field3>>  <<TableEnd:Table1>>

The values of each of the three fields would be displayed for each entry in the table.

 

To add a trigger:

 

1.   Place the cursor at some point between the TableStart and TableEnd markers, although not within a field marker.

 

2.   See the section on Inserting Placeholders Into Document Templates for instructions on finding and inserting placeholders.

 

The trigger marker will be inserted at the cursor location, and will be identified as a Repeater Trigger.

 

Example:

<<TableStart:Table1>>  <<Field1>>  <<Field2>>  <<Field3>>  <<RepeaterTrigger_Trigger1>>  <<TableEnd:Table1>>

With this configuration, when the document is generated the system will move through the table one record at a time, checking the trigger for each row.  Only records that meet the requirements of the trigger (where the trigger evaluates as True) will be included in the document.

 

Note:  A nested trigger can be used, meaning a trigger that includes other triggers within its conditions.