Using table commands

Table commands allow you to use any of the table styles in Word to add and format tables in your documents. These are specifically intended for use with draft bill variables when creating bill templates, allowing you to use tables to create professional looking bills.

Table command status

Table commands must appear in the following format:

[&TABLE,table style][variable name][&ENDTABLE,columns,function]

The table command syntax has these parts:

Part

Description

&TABLE

Required. Used to indicate the start of a table. Also includes the {table style} part of the syntax.

Table Style

Optional. An integer representing one of the table styles in Word. e.g. 2. If no table style is specified the table will be displayed without any formatting.

Variable Name

Required. One of the disbursement or matter draft bill variables. For further details of the draft bill variables, refer to Draft Bill Variables table below.

&ENDTABLE

Required. Used to indicate the end of a table. Also includes the {columns} and {function} parts of the syntax.

Columns

Required. An integer representing the number of columns required in the table, e.g. 4. Used with the &ENDTABLE statement.

Function

Optional. Used with the &ENDTABLE statement to indicate a function (see below) is to be applied to a column. Each function must be separated by a comma ','. If no function is required, it may be left blank, however a comma must still be included, e.g. [&ENDTABLE,4,function,function,,].

Columns can also have multiple functions by separating each with a tilde symbol '^', e.g. [&ENDTABLE,4,function^function^function,,,].

DELETE

Used to delete a column that is not required. Example:

[&ENDTABLE,4,DELETE,,,,]

CALCULATE

Used to calculate the total of a column. Example:

[&ENDTABLE,4,CALCULATE,,,,]

ALIGNMENT

Used to set the alignment of a column. Must be supplied with the number representing the alignment required (0 = left aligned, 1 = centred, 2 = right aligned, and 3 = justified). Example:

[&ENDTABLE,4,ALIGNMENT:2,,,,]

WIDTH

Used to set the width of a column. Must be supplied with the width required in pixels (NB. 72 pixels equals 2.5 centimetres). If you decide not to define column widths, Word auto-fits the columns. Example:

[&ENDTABLE,4,WIDTH:100,,,,]

Draft Bill variables

These are the disbursement draft bill variables which can be used with table commands:

Variable

Description

bill_table_disbs

Table of billed disbursements

bill_table_disbs_count

Number of billed disbursements

bill_table_disbs_nyps

Table of billed and NYP disbursements

bill_table_disbs_nyps_count

Number of billed and NYP disbursements

bill_table_nyps

Table of NYP disbursements

bill_table_nyps_count

Number of NYP disbursements

bill_table_summary_disbs

Summary of billed disbursements

bill_table_summary_disbs_count

Number of rows in billed disbursements table

bill_table_summary_disbs_nyps

Summary of billed and NYP disbursements

bill_table_summary_disbs_nyps_count

Number of rows in billed and NYP disbursements table

bill_table_summary_nyps

Summary of NYP disbursements

bill_table_summary_nyps_count

Number of rows in NYP disbursement table

Notes