FEEL expression language: built-in functions and syntax

86 built-in functions · 18 language constructs · DMN 1.6

FEEL (Friendly Enough Expression Language) is the expression language of the OMG DMN 1.6 standard (Decision Model and Notation). Decision table cells, literal expressions and boxed expressions in a DMN model are written in FEEL. This reference covers its built-in functions and the grammar around them. To try an expression, type it into the bar above and press Enter. The FEEL playground has a context editor for variables.

Built-in functions

FEEL defines 86 built-in functions. They are grouped below into 7 pages, one per kind of value, and each function has its own section there with its signature, parameters, examples and the cases that return null. 2 more functions, marked extension, are not in the standard but are supported by the engine behind this site.

Function names in FEEL may contain spaces (string length, day of week), and every argument can also be passed by name.

Functions by group

  • FEEL boolean functions (4): truth tables for and, or and not with null, is() versus =, and the list quantifiers all() and any().
  • FEEL string functions (14): the rules all of them share, string concatenation, regex pitfalls and every function side by side.
  • FEEL numeric functions (15): a side-by-side rounding table, how FEEL number equality works, and every numeric function with its edge cases.
  • FEEL list functions (23 + 1 extension): how positions, nulls and single values behave across all of them, aggregating over lists of contexts, and every function side by side.
  • FEEL date and time functions (11 + 1 extension): date arithmetic, the two kinds of duration, time zones, and every temporal function side by side.
  • FEEL range functions (14): how points and ranges relate: before, after, meets, overlaps, includes and during.
  • FEEL context functions (5): reading entries by a key known only at runtime, and building changed copies of a context.

All functions A to Z

FunctionGroupWhat it does
absNumeric functionsReturns the absolute value of a number or duration
afterRange functionsReturns true if a lies entirely after b with no overlap
allBoolean functionsReturns true if every element is true, false if any element is false, and null otherwise
anyBoolean functionsReturns true if at least one element is true, false if all are false, and null otherwise
appendList functionsReturns a new list with the items added to the end
beforeRange functionsReturns true if a lies entirely before b with no overlap
ceilingNumeric functionsRounds towards positive infinity at the given scale
coincidesRange functionsReturns true if two points are equal or two ranges have identical endpoints and closures
concatenateList functionsReturns one list containing the elements of all argument lists, in order
containsString functionsReturns true if the string contains match anywhere, false otherwise
contextContext functionsBuilds a context from a list of {key, value} pairs, the inverse of get entries
context mergeContext functionsCombines a list of contexts into one; later entries overwrite earlier ones with the same key
context putContext functionsReturns a copy of the context with the entry set, added or replaced
countList functionsReturns the number of elements in the list
dateDate and time functionsCreates a date from an ISO 8601 string, from year/month/day components, or by truncating a date and time value
date and timeDate and time functionsCreates a date and time from an ISO 8601 string or by combining a date with a time
day of weekDate and time functionsReturns the English weekday name of the date
day of yearDate and time functionsReturns the ordinal day within the year, 1 to 366
decimalNumeric functionsRounds n to the given scale using banker's rounding (round half to even)
distinct valuesList functionsReturns the list with duplicate elements removed, preserving first-seen order
duplicate valuesList functionsReturns the values that appear more than once in the list
durationDate and time functionsCreates a days-and-time or years-and-months duration from an ISO 8601 string
duringRange functionsReturns true if a lies fully inside range, the mirror of includes
ends withString functionsReturns true if the string ends with match
evenNumeric functionsReturns true if the number is an even integer
expNumeric functionsReturns e raised to the given power
finished byRange functionsReturns true if range ends exactly where a ends and contains it, the mirror of finishes
finishesRange functionsReturns true if a ends exactly where range ends and lies within it
flattenList functionsReturns a flat list with all nested lists recursively expanded in place
floorNumeric functionsRounds towards negative infinity at the given scale
get entriesContext functionsReturns the context as a list of {key, value} pairs, enabling iteration over entries
get valueContext functionsReturns the value of the named entry, or null if the key does not exist
includesRange functionsReturns true if range fully contains a, endpoints included
index ofList functionsReturns the positions of all occurrences of match, as an ascending list of 1-based indexes
insert beforeList functionsReturns a new list with newItem inserted before the given position
isBoolean functionsReturns true if both values are the same in the FEEL semantic domain
last day of month extensionDate and time functionsReturns the day number of the last day of the value's month (28, 29, 30 or 31), handy for billing-period and deadline logic
list containsList functionsReturns true if the list contains the element
list replaceList functionsReturns a new list with the element at the position, or every element accepted by the matcher function, replaced by newItem
logNumeric functionsReturns the natural logarithm
lower caseString functionsReturns the string with every character converted to lower case
matchesString functionsReturns true if the input matches the regular expression
maxList functionsReturns the largest element
meanList functionsReturns the arithmetic average of the numbers; null for an empty list
medianList functionsReturns the median: the middle element of the sorted values, or the mean of the two middle elements for an even count
meetsRange functionsReturns true if range1 ends exactly where range2 begins, with both endpoints included
met byRange functionsReturns true if range1 begins exactly where range2 ends, the mirror of meets
minList functionsReturns the smallest element
modeList functionsReturns the most frequent value(s) as a list; ties produce several results in ascending order
moduloNumeric functionsReturns the remainder of the division
month of yearDate and time functionsReturns the English month name of the date
notBoolean functionsLogical negation with three-valued logic: not(true) is false, not(false) is true, and anything else, including null, yields null
nowDate and time functionsReturns the current date and time
numberNumeric functionsParses a string into a number, optionally describing which grouping and decimal separators the string uses
oddNumeric functionsReturns true if the number is an odd integer
overlapsRange functionsReturns true if the ranges share at least one point, in either order
overlaps afterRange functionsReturns true if range1 ends after range2 and they overlap without either containing the other, the mirror of overlaps before
overlaps beforeRange functionsReturns true if range1 starts before range2 and they overlap without either containing the other
partition extensionList functionsSplits the list into consecutive chunks of the given size; the last chunk may be shorter
productList functionsReturns the product of the numbers
removeList functionsReturns a new list with the element at the given position removed
replaceString functionsReturns the input with every match of the regular expression replaced by the replacement, which may reference capture groups as $1, $2, …
reverseList functionsReturns the list in reverse order
round downNumeric functionsRounds towards zero at the given scale
round half downNumeric functionsRounds to the nearest value; ties round towards zero
round half upNumeric functionsRounds to the nearest value; ties round away from zero (the rounding most people learn in school)
round upNumeric functionsRounds away from zero at the given scale
sortList functionsReturns the list sorted by the precedes function
splitString functionsSplits the string at every match of the delimiter pattern and returns the parts as a list of strings
sqrtNumeric functionsReturns the square root; null for negative input
started byRange functionsReturns true if range begins exactly where a begins and contains it, the mirror of starts
startsRange functionsReturns true if a begins exactly where range begins and lies within it
starts withString functionsReturns true if the string begins with match
stddevList functionsReturns the sample standard deviation of the numbers
stringString functionsConverts any FEEL value to its string representation
string joinString functionsConcatenates a list of strings into one string, optionally separated by a delimiter
string lengthString functionsReturns the number of characters in the string
sublistList functionsReturns the slice of the list starting at start position, running to the end or for length elements
substringString functionsReturns the part of the string that starts at start position
substring afterString functionsReturns everything after the first occurrence of match; the empty string if match does not occur
substring beforeString functionsReturns everything before the first occurrence of match; the empty string if match does not occur
sumList functionsReturns the sum of the numbers
timeDate and time functionsCreates a time from an ISO 8601 string, from components, or by extracting the time of a date and time value
todayDate and time functionsReturns the current date
unionList functionsReturns all elements of the argument lists with duplicates removed, preserving first-seen order
upper caseString functionsReturns the string with every character converted to upper case
week of yearDate and time functionsReturns the ISO 8601 week number of the date
years and months durationDate and time functionsReturns the duration between two dates as whole years and months, dropping smaller units

Language guides

Besides its built-in functions, FEEL has conditionals, iteration, quantifiers, list filters, ranges, operators and inline function definitions. The five guides below cover the whole grammar, each construct with its syntax and examples evaluated by the engine that runs the playground.

FEEL conditionals and loops

FEEL has no statements. if … then … else picks one of two values, for … in … return builds a new list from an old one, and some and every test the elements of a list. Each of them is an expression that returns a value, so you can nest them and use them anywhere a value fits.

In this guide: if … then … else · for … in … return · some … satisfies · every … satisfies

FEEL lists, filters and contexts

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.

In this guide: list filter […] · list projection (path on a list) · path access (.) · context literal {…}

FEEL unary tests and ranges

A FEEL unary test is the content of a DMN decision table input cell. The cell value is matched against the column's input: [18..65) matches 18 up to but not including 65, "gold", "silver" matches either string, and not(< 10) matches 10 or more. An empty cell, or -, matches anything.

In this guide: unary tests (decision table cells) · range / interval · in · between … and

FEEL operators

FEEL operators look like the ones in most languages, with a few differences that matter in decision logic. Numbers are decimals, so 0.1 + 0.2 is exactly 0.3. Equality is a single =. and and or are words, and negation is the function not(). A type mismatch gives null instead of an error.

In this guide: arithmetic operators · comparison and boolean operators · instance of

FEEL types, null and temporal literals

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.

In this guide: null and error propagation · temporal literals @"…" · function definition

Grammar map

Every construct of the grammar, its syntax, and the guide that explains it.

ConstructSyntaxGuide
if … then … elseif condition then expression else expressionConditionals and loops
for … in … returnfor name in list return expressionConditionals and loops
some … satisfiessome name in list satisfies conditionConditionals and loops
every … satisfiesevery name in list satisfies conditionConditionals and loops
list filter […]list[condition] · list[index]Lists, filters and contexts
list projection (path on a list)listOfContexts.entryNameLists, filters and contexts
path access (.)context.entryNameLists, filters and contexts
context literal {…}{ name: expression, name: expression }Lists, filters and contexts
range / interval[a..b] · (a..b) · [a..b)Unary tests and ranges
invalue in list · value in range · value in (test, test)Unary tests and ranges
unary tests (decision table cells)< 10 · [1..10] · 1, 2, 3 · not(1, 2)Unary tests and ranges
between … andvalue between low and highUnary tests and ranges
instance ofvalue instance of typeOperators
function definitionfunction(param, param) expressionTypes, null and literals
arithmetic operators+ - * / **Operators
comparison and boolean operators= != < <= > >= · and orOperators
temporal literals @"…"@"2026-07-01" · @"P3D" · @"10:30:00"Types, null and literals
null and error propagationnullTypes, null and literals

For copy-ready patterns, see the examples cheat sheet; for the business-friendly dialect, see B-FEEL.

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, semantics and built-in functions).