Advanced Template Editor Functions

Variable Types

There are a number of different variable types that act differently within a template. These are specified as the first component of a field to tell SILQ what to do.

I: Insert value

This will insert a value from the database. It requires that the field to be inserted must be specified as the second parameter.

E: Remove line if field is empty

This will remove the paragraph if the field is empty. A field is considered "empty" if it is blank or has the value "No" or has a zero value. If it is in a table it will remove the row. varformattype and varformatextra are ignored.

N: Remove line if field is not empty

This will remove the paragraph if the value is not empty. A field is considered "empty" if it is blank or has the value "No" or has a zero value. If it is in a table it will remove the row. varformattype and varformatextra are ignored.

PE: Remove paragraph if field is empty

This will remove the paragraph if the value is empty. If it is in a table it will still only remove the paragraph and not the row.
varformattype and varformatextra are ignored

PN: Remove paragraph if field not empty

This will remove the paragraph if the value is not empty. If it is in a table it will still only remove the paragraph and not the row.
varformattype and varformatextra are ignored

Multi: Generate Multiple rows

This will make the system generate multiple rows of data of the type that is specified. There are many multi fields that will iterate through a particular database and allow you to generate tables of information.
varformattype and varformatextra are ignored

Examples
<i:i-date>
Will insert a the i-date field

Ref: <i:m-ref><e:m-ref> This will put the literal text "Ref:" at the start of the line, then insert the m-ref field for the first field, but if the m-ref is empty it will remove the entire line so only end up with a reference line if there is a reference.

<i:i-id> <i:i-date> <i:i-pay> <i:i-recint> <i:i-out> <e:i-out> <multi:invoice>

This is an advanced use of the fields where they have been combined to achieve the required result. The multi field "<multi:invoice>" in this case will iterate through all invoices for a particular matter and create a row for each of the invoices.

The <e:i-out> field tells SILQ to remove the row for a particular invoice if the amount outstanding for the invoiced is zero. As such this will generate a list of outstanding invoices for the selected matter.