Variable

Action or Value

Example

[TABLE(Name|RowNum|ColName|RecordID|DocumentID|Where)]

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


Name = Name of the table


RowNum = The number of the row for the data. Leave blank to get all rows.


ColName = Name of the column to return. Leave blank for all columns.


RecordID = ID of Record from which to get the table data. Leave blank if data not saved to Record or if the Active Record has the data.


DocumentID = ID of Document from which to get the table data. Leave blank if data not saved to Document or if the Active Document has the data.


Where = data checks to specify which rows to return. USe the field=value syntax. Multiple can be used by separating them with ^.


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"}]


For all in a column where another column has a value:

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




[FINDTABLE(Search|HeaderOnly)]

Returns the name of the first table found in Record data that contains the Search value. 


Search - Text to look for in table. Use wildcards of * for pattern matching.


HeaderOnly - If set to True then only search the header values and NOT the data. If set to False then the Header and Values are all searched for the Search value. Default = True.

Assume table named PEOPLE that looks like this:

NAME   ADDRESS   CITY 

John Doe   123 Main   Omaha

Jane Doe   321 Forest   Lincoln


[FINDTABLE(Address)] = PEOPLE


[FINDTABLE(Omaha)] = (no match because looking at header only)


[FINDTABLE(Omaha|False)] = PEOPLE


[FINDTABLE(Doe|False)] = (no match because data value is not exactly "Doe")


[FINDTABLE(*Doe*|False)] = PEOPLE


[TABLEROWCOUNT(TableName|Column|ByLineNum|RecordID|DocumentID|Where)]

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 value in any column will be counted as a row. If you enter a name then only values in that column will count. 


ByLineNum - Whether to return the maximum Line Number found or the count of the number of unique lines. True = Returns the highest line number found. False = Returns the number of lines found. Default = True.


RecordID = ID of Record from which to get the table data. Leave blank if data not saved to Record or if the Active Record has the data.


DocumentID = ID of Document from which to get the table data. Leave blank if data not saved to Document or if the Active Document has the data.



Where = data checks to specify which rows to return. Use the field=value syntax. Multiple can be used by separating them with ^.


[TABLEROWCOUNT(Items)] = 5


[TABLEROWCOUNT(Items||False)] = 4


[TABLEROWCOUNT(Items|Num)] = 5


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


[TABLEROWCOUNT(Items|Num|False|||Num=2)] = 1



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

(# = line number)


  # First    Last      Num    Amount

  1 JOHN     SMITH     1      100

  2 JOHN     SMITH            100

  3 JOHN     SMITH     2      100

  5 JOHN     SMITH     6      100



[TABLENAMES(delimiter)]

Returns a list of the names of the tables in the current Record.


delimiter = Delimiter character for the list. Default is semi-colon ;


[TABLENAMES()] - PEOPLE


[TABLENAMES()] - PEOPLE;CITIES


[TABLENAMES( - )] - PEOPLE - CITIES


[TABLETOHTML(...)]

Returns a string that represents an HTML table from an E-form table


Table Name = Name of the E-form table from which to grab the data


Record ID - ID of the Record where the data is saved


Document ID - ID of the Document where the data is saved


Columns = ^ delimited list of column names of the data to put into the table. These are the data names of the columns as saved in the table - NOT the headers.


Headers = ^ delimited list of headers for the table columns to put into the table. These are the display names of the columns - NOT the data names.


Border - Border width for the table display. This is a number value of how thick to make the borders.


Width - Width of the entire table. Usually this is in percentages but it can be in pixels as well.


Table Style - The CSS style tags to place on the table element in the resulting HTML. Used mainly for sizing and coloring the table.


Header Row Style - The CSS style tags to place on the table header element in the resulting HTML. Used mainly for coloring the header row.


Data Row Style - The CSS style tags to place on the table data row elements in the resulting HTML. Used mainly for coloring the data rows.



[TABLETOHTML(Table1|123|124|EmpName^EmpAddress^EmpCity|Name^Address^City|1|100%|border-color: red;|background-color: black; color: white;|background-color: lightgray; color: black;)]


<table border="1" width="100%" style="border-color: red;">

<thead>

<tr style="background-color: black; color: white;">

<th>Name</th>

<th>Address</th>

<th>City</th>

</tr>

</thead>

<tbody>

<tr style="background-color: lightgray; color: black;">

<td>John Smith</td>

<td>123 Maple</td>

<td>Anywhere</td>

</tr>

</tbody>

</table>