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.
| Construct | Syntax |
|---|---|
| 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]
| Element | Type | Description |
|---|---|---|
| condition | boolean | filter test; item is the current element |
| index | number | 1-based position; negative counts from the end |
[1,2,3,4][item > 2]
[{name:"a",age:30},{name:"b",age:20}][age > 25].name
[1,2,3][1]
[1,2,3][-1]
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
| Element | Type | Description |
|---|---|---|
| entryName | name | the context entry to project from each element |
[{x:1},{x:2}].x
[{name:"a",age:30},{name:"b",age:20}].age
[{name:"a",age:30},{name:"b",age:20}][age > 25].name
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
| Element | Type | Description |
|---|---|---|
| entryName | name | the entry to read; unknown entries yield null |
{a: {b: 7}}.a.b
{a: 1}.b
{customer: {name: "Anna"}}.customer.name
date and time("2026-07-01T10:30:00").hour
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 }
| Element | Type | Description |
|---|---|---|
| name | name or string | the entry key; may contain spaces, digits and ’ |
| expression | any | the value; may reference entries defined above it |
{a: 1, b: a + 1}.b
{customer: {name: "Anna", age: 34}}.customer.age
{net: 100, vat: net * 0.081, gross: net + vat}.gross
{address line 1: "Main St 5"}.address line 1
Related: path access (.) · list projection (path on a list) · function definition · context · context put · get entries
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).