You can mark any or all of the rows, columns, and fields in a repeat table as conditional. In practice, these conditions operate as filters, allowing rows, columns, and fields in the table to be conditionally shown (and populated) or hidden. When you are constructing your template, you define various condition expressions on rows, columns, and fields of a table. These conditions are then evaluated at runtime when a contract document is generated using the template.

For example, your table consists of four columns: Product, Quantity, List Price, and Net Price. You can define a condition to show the Net Price column only when the Account Name is ABC Company.



To conditionalize table columns

  1. In the Templates pane, go to the Work tab, click the dropdown button () and select Fields. The Fields pane displays the Repeat Table.
  2. Click the Settings button () next to the Repeat Table name.
  3. In the Repeat Table Settings pane, click Add Condition to open the template expression builder.
  4. Click the Conditions on Column tab.
  5. Select a column from the Select a column to make it conditionally shown dropdown list. 
  6. To create a conditional expression, enter values for the following fields:
    • Field - Select the field that you want to set as the criteria for the condition. You can select any field from the object (whose fields are displayed in the table) or the parent object (parent of the object whose fields are displayed in the table) or lookup objects. For example, if the table displays the fields from Service Plan Device object, the Field column lists all the available fields of Service Plan Device, Agreement Service Plan (parent object) and lookup objects for Service Plan Device and Agreement Service Plan.
    • Operator - You must select the logical operator from the picklist. This forms the relationship between the Field and its Value.
    • Value - Enter the value of the field name selected in the Field.

  7. Click Add Condition to create additional expressions for the same column. You can create up to nine filters for a single column.

  8. Enter Custom Logic to add a logical relation between multiple rows. The supported filter logic operators are AND and OR. You can use parentheses for setting the precedence. For example, if you have five rows you can create a filter logic like, (((1 AND 3) OR (2 AND 4)) AND 5).  In the absence of custom logic, the default relationship between the rows is the Boolean operator AND.
  9. Click Test to check whether your filter logic expression is correct. If your logic is incorrect, you will see a message in red.
  10. Repeat steps 48 for each column you want to filter.
  11. Click the Condition on Row tab when you are finished to continue to the next screen in the Expression Builder to define any conditional rows in your table (see the next section for complete instructions).
  12. Click Save to save your table filters and return to your document.

After the condition is successfully saved, a Lightning icon () is displayed next to the particular repeat table. Click the Lightning icon to expand and view the conditions added to the particular repeat table. Click the lightning icon again to close.

If you are defining column filters for a table inside a section that contains third-level fields, you cannot apply column filters on objects that are not included in the table. 

The column condition is created for the table. You can modify or delete the condition. 

To conditionalize table rows

  1. In the Templates pane, go to the Work tab, click the dropdown button () and select Fields. The Fields pane displays the repeat table and the fields.
  2. Click the Settings button ( ) next to the repeat table name.
  3. In the repeat table's settings pane, click Add Condition to open the template expression builder.
  4. Click the Condition on Row tab.
  5. To create a conditional expression, enter values for the following fields:
    • Field: Select the field that you want to set as the criterion for the condition. You can select any field from the parent object (parent of the object whose fields are displayed in the table), grandparent object (parent’s parent), or lookup objects. For example, if the table displays the fields from Service Plan Device object, Field lists all the available fields of the Agreement Service Plan (parent object), Agreement (grandparent object) and lookup objects for Agreement and Agreement Service Plan.
    • Operator: Select the logical operator from the picklist. This forms the relationship between the fields and its value.
    • Value: Enter the value of the selected field.

  6. Click Add Condition to create more conditional expressions. You can create up to nine rows of conditions to be used in a single expression.
  7. Enter Custom Logic to add a logical relation between multiple rows. The supported filter logic operators are AND and OR. You can use parentheses for setting precedence. For example, if you have five rows you can create a filter logic, like (((1 AND 3) OR (2 AND 4)) AND 5).  In the absence of a filter logic, the default relationship between the rows is the Boolean operator AND.
  8. Click Test to check whether your filter logic expression is correct. If your logic is incorrect, you will see a message in red.
  9. Click Save to save your table filters and return to your document.

Once the condition is successfully saved, a lightning icon () is displayed next to the particular repeat table. Click the Lightning icon to view the conditions added to the particular repeat table. Click the lightning icon again to collapse.

The row condition is created for the table. You can modify or delete the condition. 

To conditionalize table fields

  1. Select the field in the repeat table. In the Work tab of the Templates pane, click the dropdown button () and select Segments and click New Segment to open the Segment Condition dialog.
  2. Create a conditional expression or a complex expression using logical operators in the Segment Condition dialog. To create an expression enter values for:

    Field Name

    Description

    FieldSelect the field to set as a criterion. The Field drop-down shows the current fields and fields from the parent object, grouped hierarchically. 
    OperatorSelect the logical operator from the drop-down. This forms the relationship between the field and its value.
    ValueEnter the value of the selected field.
  3. Click Add row to create additional expressions for the same column. You can create up to nine filters for a single column.
  4. Enter Custom Logic to add a logical relation between multiple rows. The supported filter logic operators are AND and OR. You can use parentheses to set precedence. For example, if you have five rows you can create a filter logic like, (((1 AND 3) OR (2 AND 4)) AND 5).  In the absence of custom logic, the default relationship between the rows is the Boolean operator AND.
  5. Click Test to check whether your filter logic expression is correct. If your logic is incorrect, you will see a message in red.
  6. Click Save to save your table filters and return to your document.

Similar to selecting a field in the repeat table and setting a segment condition for it, you can also enter your preferred text as a field inside a repeat table, select the text, and apply a condition to that text. The steps to apply a segment condition to the entered text is similar to the steps you need to follow for applying a condition to a field. 

To edit column and row conditions

  1. In the Templates pane, go to the Work tab, click the dropdown button () and select Fields. The Fields pane displays the repeat table and the fields.
  2. Click the Settings button( ) next to the repeat table name.
  3. In the Repeat Table Settings pane, click Edit button().
  4. Update conditions and click Save.