FEEL lists, filters and contexts

FEEL language guide · 4 constructs · DMN 1.6

Most DMN input data is a list of records: order lines, applicants, past claims. FEEL handles it with four pieces of syntax. Square brackets filter a list or pick one element, a dot reads an entry from a context, the same dot on a list of contexts collects that entry from every element, and braces build a context.

Positions are 1-based, and a path to an entry that does not exist gives null instead of an error. For the functions that work on lists and contexts, see the list functions and context functions.

ConstructSyntax
list filter […]list[condition] · list[index]
list projection (path on a list)listOfContexts.entryName
path access (.)context.entryName
context literal {…}{ name: expression, name: expression }

list filter […]

Square brackets after a list either filter it or index into it. In a filter the implicit variable item refers to the current element, and the entries of a context element are directly in scope, so a filter can name the fields of the records it filters. A numeric index selects one element: FEEL is 1-based, and negative indexes count from the end.

list[condition] · list[index]

ElementTypeDescription
conditionbooleanfilter test; item is the current element
indexnumber1-based position; negative counts from the end
[1,2,3,4][item > 2]
returns [3, 4] Try it ↑
[{name:"a",age:30},{name:"b",age:20}][age > 25].name
returns [a] Try it ↑
[1,2,3][1]
returns 1 Try it ↑
[1,2,3][-1]
returns 3 Try it ↑

Related: list projection (path on a list) · for … in … return · range / interval · count · sublist · sort

list projection (path on a list)

Applying a path to a list of contexts projects that entry out of every element and returns a list of the values, the equivalent of a map over a field. Combined with a filter this replaces most of what would otherwise need an explicit for expression.

listOfContexts.entryName

ElementTypeDescription
entryNamenamethe context entry to project from each element
[{x:1},{x:2}].x
returns [1, 2] Try it ↑
[{name:"a",age:30},{name:"b",age:20}].age
returns [30, 20] Try it ↑
[{name:"a",age:30},{name:"b",age:20}][age > 25].name
returns [a] Try it ↑

Related: list filter […] · path access (.) · context literal {…} · sum · distinct values

path access (.)

The dot operator reads an entry out of a context and chains for nested structures. Reading an entry that does not exist yields null rather than an error, which is why a typo in a path silently collapses a decision to null instead of failing loudly.

context.entryName

ElementTypeDescription
entryNamenamethe entry to read; unknown entries yield null
{a: {b: 7}}.a.b
returns 7 Try it ↑
{a: 1}.b
returns null Try it ↑
{customer: {name: "Anna"}}.customer.name
returns Anna Try it ↑
date and time("2026-07-01T10:30:00").hour
returns 10 Try it ↑

Related: context literal {…} · list projection (path on a list) · null and error propagation · get value · get entries

context literal {…}

A context is FEEL's record type, written as brace-delimited key/value entries. Later entries can refer to earlier ones by name, which makes a context literal usable as a let-binding block for breaking a long expression into named steps. Entry names may contain spaces, digits (address line 1) and the ’ character.

{ name: expression, name: expression }

ElementTypeDescription
namename or stringthe entry key; may contain spaces, digits and ’
expressionanythe value; may reference entries defined above it
{a: 1, b: a + 1}.b
returns 2 Try it ↑
{customer: {name: "Anna", age: 34}}.customer.age
returns 34 Try it ↑
{net: 100, vat: net * 0.081, gross: net + vat}.gross
returns 108.1 Try it ↑
{address line 1: "Main St 5"}.address line 1
returns Main St 5 Try it ↑

Related: path access (.) · list projection (path on a list) · function definition · context · context put · get entries

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