Using Expressions, Fields, and Functions in Articles
Articles allows you to insert dynamic values into your documents using a simple expression language. This lets you display data from tables, format numbers and dates, and build sentences that combine text with calculated values. Expressions appear inside square brackets and are evaluated when the document is generated.
Understanding Field References
A field reference pulls data from a table in your data source. The format is:
<TableName."FieldName">
Examples:
<Customers."Name">— customer name<Orders."OrderDate">— order date<Invoices."Balance">— invoice balance
Field references must always be wrapped in angle brackets. The table name appears first, followed by the field name in quotes.
Using Expressions Inside Text
To insert a field into a sentence, wrap the expression in square brackets:
Your name is [ <Customers."Name"> ].
Articles replaces the expression with the actual value when the document is generated.
Combining Text and Fields
You can combine text and expressions freely:
'Customer: ' + <Customers."Name">
When placed inside square brackets, this becomes:
[ 'Customer: ' + <Customers."Name"> ]
Using Functions Inside Expressions
Articles supports many formatting functions that let you control how values appear. Functions always follow a pattern:
FunctionName( FormatString , Value )
Both the function call and the field reference must be inside the square brackets.
Formatting Numbers with FormatFloat
FormatFloat lets you format numeric values such as balances, totals, and quantities. The first parameter is the format pattern, and the second is the field value.
[ FormatFloat('$#,##0.00', <Customers."Balance">) ]
This produces output like:
$1,245.50
Common numeric formats:
#,##0— whole numbers with commas#,##0.00— two decimal places$#,##0.00— currency format0.###— up to three decimal places
Formatting Dates with FormatDateTime
FormatDateTime controls how dates and times appear. The first parameter is the date format string, and the second is the field value.
[ FormatDateTime('mmmm d, yyyy', <Orders."OrderDate">) ]
Example output:
February 26, 2026
Common date formats:
mm/dd/yyyy→ 02/26/2026mmmm d, yyyy→ February 26, 2026ddd, mmm d→ Thu, Feb 26yyyy-mm-dd→ 2026-02-26
Conditional Expressions with IIf
The IIf function allows simple conditional logic inside expressions. It follows this pattern:
IIf( Condition , ValueIfTrue , ValueIfFalse )
Example:
[ IIf(<Invoices."Balance"> > 0,
'Amount Due: ' + FormatFloat('$#,##0.00', <Invoices."Balance">),
'Paid in Full'
) ]
This displays a balance only when it is greater than zero.
Expression Rules to Remember
- All expressions must be inside square brackets:
[ ... ] - Field references must be inside angle brackets:
<Table."Field"> - Format strings must use single quotes:
'mm/dd/yyyy' - Text values must be in single quotes:
'Customer: ' - Use
+to concatenate text and values - Functions must be inside the brackets along with the field
Complete Example
The following expression produces a full sentence with a formatted balance:
Your balance is [ FormatFloat('$#,##0.00', <Customers."Balance">) ].
Example output:
Your balance is $1,245.50.
Troubleshooting Common Issues
- Missing brackets — expressions will not evaluate without
[ ] - Double quotes inside format strings — always use single quotes
- Incorrect field syntax — field names must be quoted
- Function outside brackets — functions must be inside
[ ] - Missing parentheses — functions require parentheses around parameters
With these rules, you can build clear, dynamic, and professional documents that automatically pull and format data from your system.