Table Clauses

Clauses can be used with Microsoft Word tables. Table clauses enable you to create a table in Microsoft Word and then populate the table with information from a transaction when the document is generated. Table clauses also enable you to sum columns in the table using a SUM pseudo bind format. Therefore, when the system resolves bind variables and populates the table, it also calculates amount totals for columns that include the pseudo bind.

A pseudo bind is an existing bind with the $$ symbol before and after the bind, instead of the typical %% bind symbol. You use the pseudo bind to instruct the document generator to provide a sum of all table rows where that same bind name occurs as a regular bind. If you use the pseudo bind construction with a nonnumeric bind, it treats the bind as regular text and doesn't SUM .

You can use other clause features including a title and clause text before and after the table. The system displays the repeating objects in a tabular format.

Note:

After you define a clause as a table clause type, you cannot change the clause type.

Using table clauses you can:

  • Control the format of the table, such as style and column width.

    Use the Edit Document button to access the Microsoft Word document and create the table. This enables the available Microsoft Word formats.

  • Enter text and select binds for the table before the system displays the table.

    You can use the existing Title field on the clause for the text.

  • Display the title and explanatory text for the table, when you view the document.

    When you use Microsoft Word, you can add and format text before and after the table. This text prints in the final document because it was formatted in the Microsoft Word document.

  • Calculate totals for table columns.

    This calculation uses a pseudo bind format and only calculates sums. When an existing bind name is wrapped with a $$ tag, such as $$MERCHANDISE_AMT$$, it means that the system should provide the sum of all values for that field in the table. You can place the bind anywhere in the table, but typically you should place it above or below the corresponding bind name.

    When the system creates the document, it determines the bind variable by removing the $$ tag and sums the amount for all rows of that bind name in the table. The summing pseudo bind calculates sums for an entire column. It does not perform subtotaling.

    The system does not log this bind format like normal binds. You cannot edit this reserved bind when you are editing the clause. The system cannot ensure that a bind was entered using a numeric bind. If the pseudo bind is used against an inappropriate bind, such as a nonnumeric bind, the system ignores it.

  • Calculate totals for table rows.

    The system provides some delivered binds that show the sum of amounts within a table row. For example, the bind PO_FREIGHTTAXMISC provides a sum of the freight, tax, and miscellaneous amounts for a purchase order line. If you want to see this sum, you do not need to use a pseudo bind, instead you can use this bind that is provided by the system. You can find these binds by accessing the Bind Mappings Page.

  • Suppress repeated key information.

    You can limit duplicate key values in a table using the Clause Definition Page. This is useful when redundant information, such as item ID or item description, is presented across different lines in a table.

Note:

You cannot create table clauses when you import objects.

Steps for Creating Table Clauses

Use these steps to create a table clause:

  1. Create a clause using the Table value in the Clause Type field.

  2. Load binds into the body of the clause by clicking the Add Variables button.

    You can use these binds to populate table cells. Binds that you load must be mapped to a transaction. The system requires at least one repeating bind in a table clause so that it can expand the data when the document is created. You can find the repeating binds by accessing the Bind Mappings Page and selecting binds where the Level for the Source Record field is one or greater.

    Make sure you select the Full Text check box when you add the variable so that the value is placed in the Full Text box of the clause body. After you add the variables and save the clause, the system automatically selects the Repeating Objects check box if you have repeating binds in the clause. In addition, when you save the table clause, the system validates the clause and provide error messages when errors occur.

  3. Click the Edit Document button to access the Microsoft Word version of the document.

  4. Make document edits and insert a table in the document.

    Before you can use the table clause, you must insert a table in the Microsoft Word document. After inserting the Microsoft Word table, you can move column and row information into the table cells. This includes moving the bind variables into their appropriate cells. In the table clause there should be one row with the repeating bind value . For example, you might create a Microsoft Word table that has one row that has the Item ID, Description, and other needed information at that level for the item. When the document is created, the system expands this row to include all items included (repeated) that come from the contract transaction. You can also edit the clause title and place text before and after the table.

  5. Save the document and check it into the clause library.

After establishing clause values, you can use the clause in an authored document. When you generate a document, the system retrieves information from the source transaction, and applies the values and summations that you defined in the clause.

Table Clause Examples

When you define table clauses, you can use the $$ tag multiple times to enclose summation values.

This example illustrates how bind variables can appear in a Microsoft Word document before they are resolved:

Microsoft Word tagging setup for table clauses

Consider these points when defining table clauses in Microsoft Word:

  • All binds from the same bind mapping record must be on the same row of the table.

    For example, tax and freight are on the same record.

  • When you are using long bind names, you need to specify fixed column widths when you build the table, so that the bind names can wrap.

    The final results display wrapped when necessary within the columns that you specify.

This example illustrates how a table clause can appear after binds have been resolved for a Microsoft Word contract document:

Microsoft Word table clause example

This example illustrates how you can use the Suppress Duplicate Keys check box and the Last Key Field Column field to suppress duplicate values. In the example, the Item ID and Shipto columns have been suppressed. This table was defined by selecting theSuppress Duplicate Keys check box and entering 3 in Last Key Field Column field. Starting with the Due Date column, table values are not suppressed.

When you define the table, you can bold fields such as the Totals row. You can apply formatting on the fixed part of the table. If you format a bind, the system applies the same formatting when it resolves the bind.

Note:

In this example, the table amounts do not line up by decimal points. You can right justify columns in Microsoft Word to correct this.

Table Clause Errors

Several conditions exist that produce system errors and warnings when using table clauses. When there is a problem validating a table clause, the system displays many of the errors above the Title field. Error conditions include:

  • When you generate a document with a table clause, but a table does not exist in the full text portion of the clause, the system generates the document with the table clause repeated.

  • When you create a table clause and there are no repeating binds.

  • When you add a table clause to a rule, and you enter reference text.

  • When you attach a table clause to a rule,.

  • When you use a nonnumeric bind name as a pseudo bind in a table clause, the system allows the entry, but ignores the bind when it generates the document.

  • When you use a nonexistent bind name as a pseudo bind in a table clause, the system allows the entry, but ignores the bind when it generates the document.

Related Topics