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.

ConstructSyntax
null and error propagationnull
temporal literals @"…"@"2026-07-01" · @"P3D" · @"10:30:00"
function definitionfunction(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.

ElementTypeDescription
nullnullthe absent value; also the result of most type errors
1 + null
returns null Try it ↑
{a: 1}.b
returns null Try it ↑
"x" + 1
returns null Try it ↑
sum([1, null])
returns null Try it ↑
false and null
returns false Try it ↑
if null then 1 else 2
returns 2 Try it ↑
sum([1, null, 3][item != null])
returns 4 Try it ↑
not(null)
returns null Try it ↑

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"

ElementTypeDescription
@"date"dateISO date, @"2026-07-01"
@"duration"durationISO 8601 duration, @"P3D" or @"P1Y6M"
@"2026-07-01"
returns 2026-07-01 Try it ↑
@"P3D"
returns P3D Try it ↑
@"2026-07-01T10:00:00"
returns 2026-07-01T10:00 Try it ↑
@"2026-07-01" + @"P1D"
returns 2026-07-02 Try it ↑
@"2026-13-01"
returns null Try it ↑

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

ElementTypeDescription
paramnameparameter name, optionally with a type: name: number
expressionanythe body; parameters are in scope
(function(a, b) a + b)(2, 3)
returns 5 Try it ↑
{ add: function(a,b) a + b, r: add(2,3) }.r
returns 5 Try it ↑
{ vat: function(net) net * 0.081, total: 100 + vat(100) }.total
returns 108.1 Try it ↑

Related: context literal {…} · for … in … return

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).