Function reference
Functions are surface-specific. Calculated fields have numeric and aggregate
functions, validation rules add MATCHES, and templates have text functions.
Collection predicates and Security forms are listed separately below. Read the
setting’s authoring metadata for the exact admitted
overloads and paths; a function outside that profile is rejected.
Date and time functions
Section titled “Date and time functions”The full set is available in Board Statements, Security Statements and Workflow conditions. Board status invariants impose additional dependency restrictions. Task completion admits only the calendar-boundary and addition functions that need no ambient time zone. Ordinary Entity Statements, validation rules, field behavior, presentation conditions, Reference Eligibility and calculated fields do not inherit these functions.
The Board Statement page defines the argument families, result types, workspace-time-zone behavior, month-end clamping and duration arithmetic.
| Functions | Behavior |
|---|---|
YEAR, QUARTER, MONTH, ISO_WEEK, DAY, DAY_OF_WEEK | Extract a calendar component from a date or instant. |
HOUR, MINUTE, SECOND | Extract a time component from a time or instant. |
DATE, TIME | Convert an instant to its workspace-local date or time. |
START_OF_MONTH, END_OF_MONTH | Return a calendar-month boundary. |
ADD_DAYS, ADD_MONTHS, ADD_YEARS | Add an integer number of calendar units to a date. |
ADD_HOURS, ADD_MINUTES, ADD_SECONDS | Add an integer number of elapsed units to an instant. |
YEAR(BoardData.RequiredAt) = YEAR(@today)ADD_MONTHS(Target.ContractStart, 1) <= @todayStatements and validation rules — CATEGORY
Section titled “Statements and validation rules — CATEGORY”CATEGORY(...) is a typed portable literal available in Statements and
Validation Rules. It is written like a function call, but it identifies one
Classifier category rather than calculating a value at runtime.
| Form | Behavior |
|---|---|
CATEGORY('catalog-key', 'root-key', …, 'node-key') | Resolves the stable Catalog key and category path when the expression is saved, then compares the stored category identity. |
Capability = CATEGORY('product-area', 'operations', 'platform')Capability IN ( CATEGORY('product-area', 'operations', 'platform'), CATEGORY('product-area', 'operations', 'integration'))See Classifier category values for supported operators, null behavior, and field-to-field restrictions.
Calculated fields — local functions
Section titled “Calculated fields — local functions”Available in calculated field expressions.
| Function | Behavior |
|---|---|
IF(condition, whenTrue, whenFalse) | Evaluates condition, then only the selected branch. Both branches are type-checked; branches must be compatible (numeric with numeric, money with money, one branch may be NULL). |
COALESCE(v1, v2, …) | First non-null value, left to right, short-circuiting. |
ROUND(value, scale) | Rounds a number or money value away from zero on midpoints. scale is an integer literal from 0 to 6. |
ABS(value) | Absolute value of a number or money value. |
MIN(v1, v2, …) / MAX(v1, v2, …) | Smallest / largest non-null argument. All non-null arguments must be compatible numbers or compatible money values. |
IF(Qty > 0, Qty, 0)COALESCE(ManualTotal, Total)ROUND(Total * (1 - Discount / 100), 2)Calculated fields — aggregate functions
Section titled “Calculated fields — aggregate functions”Aggregates run from a parent record over its child records through an inverse-reference field. They are valid only as the whole calculated-field expression, and only in the two-argument form:
| Function | Behavior |
|---|---|
SUM(InverseRef, SourceField) | Sum of the source field over active child rows. Empty set → 0. |
COUNT(InverseRef, SourceField) | With the child Id field: counts active child rows. With another field: counts rows where that field is not null; a boolean field or a condition is not counted (SUM(InverseRef, IF(Flag IS NULL, 0, 1)) counts the rows where Flag is set). Empty set → 0. |
AVG(InverseRef, SourceField) | Average over non-null values. Empty set → NULL. |
MIN(InverseRef, SourceField) / MAX(InverseRef, SourceField) | Smallest / largest value. Empty set → NULL. |
SUM(Positions, TotalPrice)COUNT(Positions, Id)See calculated fields for source-field rules and money/currency behavior.
Validation rules — MATCHES
Section titled “Validation rules — MATCHES”Available only in validation rule expressions.
| Function | Behavior |
|---|---|
MATCHES(value, "regex") | Tests text with the supported .NET-compatible regex subset compiled to PostgreSQL. The pattern must be a string literal. Matching is case-sensitive; a leading (?i) enables ignore-case. A null input produces unknown. |
MATCHES(Code, '^[A-Z]{3}-[0-9]{3}$')MATCHES(Email, '(?i)@example[.]com$')Lookarounds, backreferences, word boundaries and most inline options are
rejected. See regex syntax and limits
before copying a .NET pattern. A regex backslash must be escaped in the DSL
string: write MATCHES(Code, '^\\d+$'). In a JSON request, escape those
backslashes once more.
Presentation templates — text functions
Section titled “Presentation templates — text functions”Available inside { … } placeholders of
presentation rule templates.
Workflow DevLog templates
also admit trim, upper, lower and coalesce, with their own scalar
Context paths. They reject optionLabel and runtime variables.
| Function | Behavior |
|---|---|
trim(x) | Removes leading and trailing whitespace. |
upper(x) / lower(x) | Uppercase / lowercase. |
coalesce(x, …) | First nonempty value, skipping null and whitespace-only text; keeps 0 and FALSE. All arguments are evaluated. |
optionLabel(SelectPath) | Configured caption for a direct Select field path. Null renders empty, unknown or removed keys fall back to the raw key, and multi-select values preserve stored order and join with , . |
{upper(Code)} — {coalesce(Nickname, Name)}{optionLabel(Category)} ({Category})Typed dates and times use workspace display formats and time zone, including inside
text functions. See template formatting
for the language used by each surface. Other value conversions retain invariant culture. trim, upper and
lower use their first argument; a missing argument renders empty text.
Value functions accept extra arguments within the placeholder’s token budget,
and evaluate them too. Template coalesce is therefore different from the
lazy, first-non-null calculated-field COALESCE. optionLabel requires
exactly one admitted Select path.
Security and Workflow special forms
Section titled “Security and Workflow special forms”| Form | Availability and meaning |
|---|---|
HAS_ROLE('role-key') | Security Statements and Workflow permission DSL: the current actor has the configured role. |
RESPONSIBLE(resource, 'responsibility-key') | Security Statements and Workflow permission DSL: the actor satisfies the responsibility on that exact resource, for example RESPONSIBLE(item, 'owner'). |
target(EntityDefinition, 'definition-key').Field | Board Security and Board-subject Workflow profiles: select one configured target and read an admitted member. Other selector forms come from authoring metadata. |
These are host-provided forms, not calculated-field or template functions.
HAS_ROLE and RESPONSIBLE are unavailable in actor-independent business
conditions. None of these three forms is available inside collection
predicates. See Security and Workflow conditions
for roots, selectors and restrictions.
Entity Statements and Board Statements — collection forms
Section titled “Entity Statements and Board Statements — collection forms”Entity Statements use these forms against direct child tables. Board Statements use the same forms against direct owned collections and, for event Bindings only, direct inverse collections published by the server-owned authoring profile. Deeper and transitive collection paths are rejected.
| Form | Behavior |
|---|---|
EXISTS Table WHERE (condition) | TRUE when at least one child row matches. |
ANY Table WHERE (condition) | TRUE when a child row matches; unknown when none matches and one is unknown. |
ALL Table WHERE (condition) | TRUE when every child row matches, also when there are none; unknown when none fails and one is unknown. |
COUNT(Table) <comparison> | Compares the number of child rows, for example COUNT(Items) BETWEEN 1 AND 3. |
EXISTS Items WHERE (Quantity > 0) AND COUNT(Items) BETWEEN 1 AND 3COUNT(Items) > 0 AND ALL Items WHERE (Quantity > 0)See Collections and related records for the complete
ANY/ALL semantics, nested collections and related-record conditions.
Ordinary function calls are not supported in field-behavior or presentation conditions — those surfaces are operator-only.