TABLE
Defines an Analytics table that the user selects as input for an analytic.
The TABLE tag can be followed by zero or more FIELD tags entered on sequential lines.
Note
The TABLE tag requires that a table pre-exists in the storage location in order to be available to be selected. For more information, see DATA.
Syntax
//TABLE variable_name label <description>
Parameters
Name | Description |
---|---|
variable_name |
The name of the variable that stores the input table name selected by the user. Use variable_name in the analytic script to reference the table. |
label |
In client applications, the interface label that users see when prompted to select the table. For example, Payments Table |
description
optional |
In client applications, descriptive text associated with the input field that users see. The description can be multiline, but it cannot skip lines. The description can help the user select the correct table. For example, Select a table that lists payments and includes a check number column. The description must be entered on the line below the associated TABLE tag. |
Examples
Basic examples
TABLE tag with description to help user select the correct input table:
//TABLE v_table_payments Payments Table Select a table that lists payments and includes a check number column.
Advanced examples
Using a table defined in a TABLE tag in the script
The following script runs an AGE command on a table that is selected by the user from the data tables in the project:
COMMENT //ANALYTIC example_script //TABLE v_table_payments Payments Table Select a table that lists payments and includes a check number column. END OPEN %v_table_payments% AGE ON payment_date CUTOFF 20141231 INTERVAL 0,30,60,90,120,10000 SUBTOTAL Payment_Amount TO r_output CLOSE %v_table_payments%