Variable

Action or Value

Example

[TABLE(Name|RowNum|ColName)]

Returns value at Row/Col within table by table name. Or returns JSON object with values if Row=0 or ColName blank.

For a table named Table1:


Name   Number   Other

------------------------

Smith  123      Any

Jones  345      OtherVal




[TABLE(Table1|1|Name)]  = Smith
[TABLE(Table1|2|Other)] = OtherVal
[TABLE(Table1|1|Number)]= 123


For a complete row:

[TABLE(Table1|1)]= [{ "LineNumber": "1", "Name": "Smith"},{ "LineNumber": "1", "Number": "123"}, { "LineNumber": "1", "Other": "Any"}]


For all values in a column:

[TABLE(Table1||Number)]= [{ "LineNumber": "1", "Number": "123"}, { "LineNumber": "2", "Number": "345"}]




[TABLEROWCOUNT(TableName|Column|All)]

Returns the number of rows in an E-form table


TableName - Name of the table to count


Column - The name of the column to check for values. If you leave this blank then any vaeu in any column will be counted as a row. If you enter a name then only values in that column will count. 


All - Whether to return ALL rows or just the non-empty ones. True = Every row (blank or not) will be counted). False = Only non-blank rows will be counted. If Column is specified then only rows where that column is not empty will count IF 'ALL' is set to False. Default = False.

[TABLEROWCOUNT(Items)] = 3


[TABLEROWCOUNT(Items||False)] = 4


[TABLEROWCOUNT(Items|Num)] = 2


[TABLEROWCOUNT(Items|Num|False)] = 4



Above examples assume this data in a table named 'Items':


  First    Last      Num    Amount

  JOHN     SMITH     1      100

  JOHN     SMITH            100


  JOHN     SMITH     2      100



[LINEITEMSCOUNT()]


[LICOUNT()]

Returns the number of line items for the current Record

[LINEITEMSCOUNT()] = 4

[LINEITEMS()]


[LI()]

Returns a JSON collection of all line items for the current Record.


This is typically used along with the OBJPROP command to gather data from line items.

{Quantity: 1, Description: "Part 123", Amount: "$123.45"}

[LINEITEMS(0|Amount||likematch)]


[LI(0|Amount||likematch)]

Returns all values from the Amount column for all line items as a JSON object.


likematch = Set to YES, Y, TRUE, or 1 to use LIKE syntax (with * as a wildcard) to find the proper variable name.

[{Amount: 1},{Amount: 10},{Amount: 5}]

[LINEITEMS(0|Amount|,|likematch)]


[LI(0|Amount|,|likematch)]

Returns all values from the Amount column for all line items as a delimited string.


likematch = Set to YES, Y, TRUE, or 1 to use LIKE syntax (with * as a wildcard) to find the proper variable name.


[LI(0|num|,) = ]1,10,5

[LINEITEMS(#|Amount||likematch)]


[LI(#|Amount||likematch)]


Returns the Amount value from line item #


likematch = Set to YES, Y, TRUE, or 1 to use LIKE syntax (with * as a wildcard) to find the proper variable name.


{Quantity: 1, Description: "Part 123", Amount: "$123.45"} = "$123.45"

[LINEITEMS(1)]


[LI(1)]

Returns the entire line item # as a JSON object.

{Quantity: 1, Description: "Part 123", Amount: "$123.45"}

[TOLINEITEMS(StringToPars|LineDelimiter| ColumnDelimiter|SkipLines|LineNumberOffset|field,field,field|Command)]

Parses out a text blob and places the data elements into the line items of the current Record.


StringToParse = The string blob to parse

LineDelimiter = The character to use to split each line

ColumnDelimiter = The character to use to split each element of each line

SkipLines = The number of lines at the top of the blob to skip while processes to handle header rows (default = 0)

LineNumberOffset = The line numbers to skip so you can add data to the end of existing line iems (default = 0)

field... = list of field names to use for the columns . Blank field names are skipped)

Command = The command to use for each line. Useful to evaluate the line as to whether or not to process it

[TOLINEITEMS(Make,Model,Qty~Ford,Mustang,2~Ford,Taurus,10|~|,|1|0|Make,,Quantity|<<IF(<<line>>|C|SKIP||<<line>>)>>)]


This example parses out the text using ~ for lines and , for columns. It skips the first line and does not skip any line item numbers. 


It saves the Make and Qty columsn into the Make and Quantity line item fields and skips the Model column completely.


Each line is compared to see if they contain the work SKIP. If they do they are blanked out so a line item will not be added for it. If it does not contain SKIP then the line is processed.