Skip to main content

Expression Reference

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:

PathResolves 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

OperatorDescriptionExample
+ - * / %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

FunctionSyntaxReturnsExample
IFIF(cond, a, b)a or bIF([Float]<0,"Critical","OK")
ANDAND(a, b, ...)BooleanAND([Float]<0,[Status]=="Active")
OROR(a, b, ...)BooleanOR([Status]=="Draft",[Status]=="Review")
NOTNOT(a)BooleanNOT([IsComplete])
SWITCHSWITCH(val, c1, r1, c2, r2, ..., default)r or defaultSWITCH([Status],"A","Approved","R","Rejected","Unknown")

Aggregate — operate on column arrays

These functions work on arrays of values, such as [sections.SectionId.rows.FieldKey].

FunctionSyntaxReturnsExample
COUNTCOUNT(array)NumberCOUNT([sections.RiskRegister.rows])
COUNTIFCOUNTIF(array, value)NumberCOUNTIF([sections.RiskRegister.rows.RAGStatus], "Red")
SUMSUM(array)NumberSUM([sections.CostReport.rows.ActualCost])
AVGAVG(array)NumberAVG([sections.Activities.rows.PercentComplete])
AVERAGEAVERAGE(array)NumberAlias for AVG

Text

FunctionSyntaxReturnsExample
CONCATCONCAT(a, b, ...)TextCONCAT([ID]," - ",[Name])
LEFTLEFT(text, n)TextLEFT([ActivityID], 4)
RIGHTRIGHT(text, n)TextRIGHT([WBSCode], 3)
MIDMID(text, start, n)TextMID([Code], 3, 2)
LENLEN(text)NumberLEN([ActivityID])
UPPERUPPER(text)TextUPPER([Status])
LOWERLOWER(text)TextLOWER([Name])
TRIMTRIM(text)TextTRIM([Description])
CONTAINSCONTAINS(text, search)BooleanCONTAINS([Name],"foundation")
STARTS_WITHSTARTS_WITH(text, prefix)BooleanSTARTS_WITH([Code],"CIV")
ENDS_WITHENDS_WITH(text, suffix)BooleanENDS_WITH([Code],"WBS")
REPLACEREPLACE(text, old, new)TextREPLACE([Status],"_"," ")

Numeric

FunctionSyntaxReturnsExample
ABSABS(n)NumberABS([Variance])
ROUNDROUND(n, decimals)NumberROUND([Progress], 1)
FLOORFLOOR(n)NumberFLOOR([Duration])
CEILINGCEILING(n)NumberCEILING([Float])
MINMIN(a, b)NumberMIN([PlannedDur],[ActualDur])
MAXMAX(a, b)NumberMAX([Float], 0)
SQRTSQRT(n)NumberSQRT([Variance])
POWPOW(base, exp)NumberPOW([Float], 2)

Date

FunctionSyntaxReturnsExample
TODAYTODAY()Date stringTODAY()
NOWNOW()ISO datetimeNOW()
DATEDIFFDATEDIFF(d1, d2, unit)NumberDATEDIFF([Start],[Finish],"d")
DATEADDDATEADD(d, n, unit)Date stringDATEADD([PlannedStart],7,"d")
YEARYEAR(d)NumberYEAR([Start])
MONTHMONTH(d)NumberMONTH([Finish])
DAYDAY(d)NumberDAY([DataDate])
FORMATDATEFORMATDATE(d, fmt)TextFORMATDATE([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

FunctionSyntaxReturnsExample
ISNULLISNULL(x)BooleanISNULL([ActualStart])
IFNULLIFNULL(a, b)a if not null, else bIFNULL([ActualStart],[PlannedStart])
ISNULLOREMPTYISNULLOREMPTY(a, b)a if not null/empty, else bISNULLOREMPTY([Notes],"No notes")
COALESCECOALESCE(a, b, ...)First non-null valueCOALESCE([Actual],[Planned],0)

Lookup

FunctionSyntaxReturnsExample
LOOKUPLOOKUP(value, rows, keyField, returnField)Value or nullLOOKUP([ProjectId],[sections.Projects.rows],"id","name")
VLOOKUPVLOOKUP(value, rows, keyField, returnField)Value or nullAlias for LOOKUP

Format

FunctionSyntaxReturnsExample
FORMATFORMAT(val, fmt)TextFORMAT([Cost],"currency")
TEXTTEXT(val)TextTEXT([Count])
NUMBERNUMBER(val)NumberNUMBER([StringField])

Format modes for FORMAT: "currency" ($n.nn), "percent" (n.n%), "fixed2" (2 decimal places), "fixed0" (integer).