FEEL types, null and temporal literals
FEEL language guide · 3 constructs · DMN 1.6
Why does my FEEL expression return null? In standard FEEL a type error does not raise an exception. It produces null, and null spreads through the rest of the expression: "total: " + 5 is null because a string and a number cannot be added. The usual causes are a mistyped path, a missing input, or two values of different types.
This guide covers null propagation, the @"…" literals for dates, times and durations, and functions you define inside an expression. Switch the playground to B-FEEL to see the business-friendly result of the same expression.
| Construct | Syntax |
|---|---|
| null and error propagation | null |
| temporal literals @"…" | @"2026-07-01" · @"P3D" · @"10:30:00" |
| function definition | function(param, param) expression |
How null works in FEEL
In standard FEEL, a type error or a missing value produces null instead of an error. Most operations on null also return null, so 1 + null, {a: 1}.b and sum([1, null]) are all null. Two rules stop the spread. and and or use three-valued logic: false and null is false and true or null is true. A comparison with = gives a plain boolean (null = null is true and 1 = null is false), so x = null checks for a missing value.
null
An if whose condition is null takes the else branch: if null then 1 else 2 returns 2. Aggregates do not skip nulls, so filter them out first: sum([1, null, 3][item != null]) returns 4.
Nothing in the result shows where a null started. To debug one, evaluate the parts of the expression one at a time in the playground.
In B-FEEL, a type error returns a default instead: 1 + null is 1 and sum([1, null]) is 1. A missing entry such as {a: 1}.b stays null in both dialects.
| Element | Type | Description |
|---|---|---|
| null | null | the absent value; also the result of most type errors |
1 + null
{a: 1}.b
"x" + 1
sum([1, null])
false and null
if null then 1 else 2
sum([1, null, 3][item != null])
not(null)
Related: path access (.) · instance of · if … then … else · get value · not
temporal literals @"…"
The @ prefix turns an ISO 8601 string into a date, time, date and time or duration literal without a constructor call. It is shorter than date("…") and reads as a value rather than a call. A malformed literal behaves like the function form: @"2026-13-01" and @"bad" parse, and evaluate to null.
@"2026-07-01" · @"P3D" · @"10:30:00"
| Element | Type | Description |
|---|---|---|
| @"date" | date | ISO date, @"2026-07-01" |
| @"duration" | duration | ISO 8601 duration, @"P3D" or @"P1Y6M" |
@"2026-07-01"
@"P3D"
@"2026-07-01T10:00:00"
@"2026-07-01" + @"P1D"
@"2026-13-01"
Related: arithmetic operators · range / interval · date · duration · date and time · time
function definition
FEEL supports inline function definitions; functions are values and can be stored in a context entry and called by that name. This keeps a repeated sub-expression in one place inside a single literal expression, without needing a separate decision.
function(param, param) expression
| Element | Type | Description |
|---|---|---|
| param | name | parameter name, optionally with a type: name: number |
| expression | any | the body; parameters are in scope |
(function(a, b) a + b)(2, 3)
{ add: function(a,b) a + b, r: add(2,3) }.r
{ vat: function(net) net * 0.081, total: 100 + vat(100) }.total
Related: context literal {…} · for … in … return
Related guides
Every result on this page was computed by the Impulse FEEL engine 0.9.1, the interpreter that runs the playground. Last updated .
Defined by the OMG DMN 1.6 specification, chapter 10.3 (the FEEL grammar and semantics).