Table Tags in Docomotion include scripts that implement various logic, such as showing or hiding specific table rows, sorting tables, setting row ranges, and adding page breaks. Below are detailed instructions on utilizing these features:

Hiding/Showing Table Rows

You can create a script to hide or display rows in the output of a dynamic table based on specified values for a specific table tag. Here’s how:

  1. Right-click the parent Table tag in the Data Tags/Form pane and select Properties.

  2. In the Table Properties window, click New to open the Script Editor.

  3. In the Script Editor, under Statements, add a description using double-click Comment.

  4. Use double-click If to start the script logic.

  5. Under Table Actions/Visual, select either HIDE ROW or SHOW ROW to implement the logic, e.g., hide row 1 if Account ID=1000.

  6. Save the script and close the Table Properties window.

Hiding/Showing Table Rows in Grouped Table

For grouped tables, scripts can show/hide specific rows or the entire table. Follow these steps:

  1. Right-click the parent Group Table tag (red ‘G’ tag) in the Data Tags/Form pane and select Properties.

  2. In the Table Properties window, click New to access the Script Editor.

  3. Add a description in Statements using double-click Comment.

  4. Use double-click If to initiate the script logic.

  5. Under Table Actions/Visual, select HIDE ROW/SHOW ROW or HIDE GRAPHICAL ROW/SHOW GRAPHICAL ROW based on your requirement.

  6. If you choose SHOW or HIDE GRAPHICAL ROW, select the row. For example, show row 1 if Asset ID=1000 or hide row 3 if Description=EMPTY.

  7. Save the script and close the Table Properties window.

Sorting Tables

Docomotion supports sorting dynamic tables at runtime with up to three sorting levels. Here’s how to add a sorting script:

  1. Right-click the parent Table tag in the Data Tags/Form pane and select Table Properties.

  2. In the Table Properties window, click New to open the Script Editor.

  3. Add a description in Statements using double-click Comment.

  4. Use double-click If to start the script logic.

  5. Under Table Actions/Visual, double-click SORT TABLE.

  6. In the Sort Table window, select the data tag for sorting, type (text, Number, or date), and sorting direction (Ascending or Descending). You can add two more sorting levels.

  7. Click OK to apply the sorting script.

  8. Save the script and close the Table Properties window.

Setting a Row Range

Define the output rows for a Salesforce table using a script:

  1. Right-click the parent Table tag in the Data Tags/Form pane and select Table Properties.

  2. In the Table Properties window, click New to open the Script Editor.

  3. Add a description in Statements using double-click Comment.

  4. Use double-click If to initiate the script logic.

  5. Under Table Actions/Behavior, select SET ROWS RANGE.

  6. Set the rows range according to your needs.

  7. Save the script and close the Table Properties window.

Adding Page Breaks

Scripts can be created to add page breaks in the output for a dynamic table. Here’s how:

  1. Right-click the parent Table tag in the Data Tags/Form pane and select Table Properties.

  2. In the Table Properties window, click New to open the Script Editor.

  3. Add a description in Statements using double-click Comment.

  4. Use double-click If to start the script logic.

  5. Under Table Actions/Behavior, click INSERT PAGE BREAK.

  6. Save the script and close the Table Properties window.

Adding Page Breaks in Grouped Table

For grouped tables, scripts can be used to add page breaks. Follow these steps:

  1. Right-click the Table tag (blue T tag) before/after which you want to add the break in the Data Tags/Form pane and select Table Properties.

  2. In the Table Properties window, click New to access the Script Editor.

  3. Add a description in Statements using double-click Comment.

  4. Under Table Actions/Behavior, select INSERT PAGE BREAK BEFORE or INSERT PAGE BREAK AFTER.

  5. Save the script and close the Table Properties window.