This reference documents all functions and operators available in the Report Forge expression engine. Functions are grouped by category.
Field references
Use square brackets [fieldKey] or curly braces {fieldKey} to reference a field value:
[ScheduleVariancePct] >= 0
{Status} == "Active"
Both syntaxes are equivalent. Field keys are case-sensitive and match the field key configured in the blueprint.
Section data paths — used in page and component visibility rules:
| Path | Resolves to |
|---|
[sections.SectionId.FieldKey] | First-row value of a field in a section |
[sections.SectionId.rows] | Full array of row objects |
[sections.SectionId.rows.FieldKey] | Array of all values in that column (for use with COUNTIF, SUM, etc.) |
[sections.SectionId.count] | Number of rows in the section |
Operators
| Operator | Description | Example |
|---|
+ - * / % | Arithmetic | [Actual] - [Planned] |
== != < > <= >= | Comparison | [Float] < 0 |
&& | Logical AND | [Float]<0 && [Status]=="Active" |
|| | Logical OR | [Status]=="Draft" || [Status]=="Review" |
! | Logical NOT | ![IsComplete] |
? : | Ternary | [Float]<0 ? "Late" : "OK" |
Logical
| Function | Syntax | Returns | Example |
|---|
| IF | IF(cond, a, b) | a or b | IF([Float]<0,"Critical","OK") |
| AND | AND(a, b, ...) | Boolean | AND([Float]<0,[Status]=="Active") |
| OR | OR(a, b, ...) | Boolean | OR([Status]=="Draft",[Status]=="Review") |
| NOT | NOT(a) | Boolean | NOT([IsComplete]) |
| SWITCH | SWITCH(val, c1, r1, c2, r2, ..., default) | r or default | SWITCH([Status],"A","Approved","R","Rejected","Unknown") |
Aggregate — operate on column arrays
These functions work on arrays of values, such as [sections.SectionId.rows.FieldKey].
| Function | Syntax | Returns | Example |
|---|
| COUNT | COUNT(array) | Number | COUNT([sections.RiskRegister.rows]) |
| COUNTIF | COUNTIF(array, value) | Number | COUNTIF([sections.RiskRegister.rows.RAGStatus], "Red") |
| SUM | SUM(array) | Number | SUM([sections.CostReport.rows.ActualCost]) |
| AVG | AVG(array) | Number | AVG([sections.Activities.rows.PercentComplete]) |
| AVERAGE | AVERAGE(array) | Number | Alias for AVG |
Text
| Function | Syntax | Returns | Example |
|---|
| CONCAT | CONCAT(a, b, ...) | Text | CONCAT([ID]," - ",[Name]) |
| LEFT | LEFT(text, n) | Text | LEFT([ActivityID], 4) |
| RIGHT | RIGHT(text, n) | Text | RIGHT([WBSCode], 3) |
| MID | MID(text, start, n) | Text | MID([Code], 3, 2) |
| LEN | LEN(text) | Number | LEN([ActivityID]) |
| UPPER | UPPER(text) | Text | UPPER([Status]) |
| LOWER | LOWER(text) | Text | LOWER([Name]) |
| TRIM | TRIM(text) | Text | TRIM([Description]) |
| CONTAINS | CONTAINS(text, search) | Boolean | CONTAINS([Name],"foundation") |
| STARTS_WITH | STARTS_WITH(text, prefix) | Boolean | STARTS_WITH([Code],"CIV") |
| ENDS_WITH | ENDS_WITH(text, suffix) | Boolean | ENDS_WITH([Code],"WBS") |
| REPLACE | REPLACE(text, old, new) | Text | REPLACE([Status],"_"," ") |
Numeric
| Function | Syntax | Returns | Example |
|---|
| ABS | ABS(n) | Number | ABS([Variance]) |
| ROUND | ROUND(n, decimals) | Number | ROUND([Progress], 1) |
| FLOOR | FLOOR(n) | Number | FLOOR([Duration]) |
| CEILING | CEILING(n) | Number | CEILING([Float]) |
| MIN | MIN(a, b) | Number | MIN([PlannedDur],[ActualDur]) |
| MAX | MAX(a, b) | Number | MAX([Float], 0) |
| SQRT | SQRT(n) | Number | SQRT([Variance]) |
| POW | POW(base, exp) | Number | POW([Float], 2) |
Date
| Function | Syntax | Returns | Example |
|---|
| TODAY | TODAY() | Date string | TODAY() |
| NOW | NOW() | ISO datetime | NOW() |
| DATEDIFF | DATEDIFF(d1, d2, unit) | Number | DATEDIFF([Start],[Finish],"d") |
| DATEADD | DATEADD(d, n, unit) | Date string | DATEADD([PlannedStart],7,"d") |
| YEAR | YEAR(d) | Number | YEAR([Start]) |
| MONTH | MONTH(d) | Number | MONTH([Finish]) |
| DAY | DAY(d) | Number | DAY([DataDate]) |
| FORMATDATE | FORMATDATE(d, fmt) | Text | FORMATDATE([Start],"dd MMM yyyy") |
Units for DATEDIFF and DATEADD: "d" (days), "w" (weeks), "m" (months), "y" (years).
Format tokens for FORMATDATE: dd (day), MM (month number), MMM (short month name), MMMM (full month name), yy (2-digit year), yyyy (4-digit year).
Null handling
| Function | Syntax | Returns | Example |
|---|
| ISNULL | ISNULL(x) | Boolean | ISNULL([ActualStart]) |
| IFNULL | IFNULL(a, b) | a if not null, else b | IFNULL([ActualStart],[PlannedStart]) |
| ISNULLOREMPTY | ISNULLOREMPTY(a, b) | a if not null/empty, else b | ISNULLOREMPTY([Notes],"No notes") |
| COALESCE | COALESCE(a, b, ...) | First non-null value | COALESCE([Actual],[Planned],0) |
Lookup
| Function | Syntax | Returns | Example |
|---|
| LOOKUP | LOOKUP(value, rows, keyField, returnField) | Value or null | LOOKUP([ProjectId],[sections.Projects.rows],"id","name") |
| VLOOKUP | VLOOKUP(value, rows, keyField, returnField) | Value or null | Alias for LOOKUP |
| Function | Syntax | Returns | Example |
|---|
| FORMAT | FORMAT(val, fmt) | Text | FORMAT([Cost],"currency") |
| TEXT | TEXT(val) | Text | TEXT([Count]) |
| NUMBER | NUMBER(val) | Number | NUMBER([StringField]) |
Format modes for FORMAT: "currency" ($n.nn), "percent" (n.n%), "fixed2" (2 decimal places), "fixed0" (integer).