Built-in Functions Reference
This article lists the built-in functions currently available in Fluent equations. Use these functions in Evaluate mode, or start the expression with = so Fluent treats it as an equation.
In older documentation and informal usage, these built-in functions may also be called macros. In this article, functions is the preferred term, but if you are looking for Fluent macros, this is the correct reference.
Fluent functions are available in Designer and in the Engines anywhere Fluent evaluates an equation, most commonly in Out Tags, Set Tags, conditions, and other tag properties that support evaluation.
How to use Fluent functions
- Start the expression with
=. - Use
${variableName}to reference Fluent variables. - Nest functions as needed, for example
=IF(ISNUMBER(VALUE(${AmountText})), ROUND(VALUE(${AmountText}), 2), 0). - When a function needs the result of a SQL, XPath, or JsonPath select, wrap the select in
DATA("...").
Common examples
| Goal | Example |
|---|---|
| Sum query results | =SUM(DATA("select Amount from Orders")) |
| Build a date | =DATE(2026, 3, 25) |
| Format output text | =TEXT(DATE(2026, 3, 25), "m/d/yyyy") |
| Fallback on error | =IFERROR(DATA("/root/phone"), "Not available") |
Supported operators
These operators work alongside the built-in functions.
| Type | Supported operators | Notes |
|---|---|---|
| Arithmetic | +, -, *, /, div, %, mod | Standard math operators |
| Comparison | =, ==, eq, !=, ne, <, lt, >, gt, <=, le, >=, ge | Use to compare numbers, text, and dates |
| Boolean | &&, and, ` | |
| Text concatenation | & | Joins text values |
| Grouping | (, ) | Controls evaluation order |
Math and trig functions
| Function | Syntax | What it does | Example |
|---|---|---|---|
ABS | ABS(number) | Returns the absolute value. | =ABS(-12) |
BASE | BASE(number,radix,min_length) | Converts a number to text in another base. | =BASE(31, 16, 4) |
BASE64DECODE | BASE64DECODE(pic) | Decodes Base64 content, typically image data. | =BASE64DECODE(${LogoBase64}) |
CEILING | CEILING(number,significance) | Rounds up to the nearest integer or multiple. | =CEILING(12.1, 1) |
DECIMAL | DECIMAL(text,radix) | Converts text in another base to decimal. | =DECIMAL("1F", 16) |
DEGREES | DEGREES(number) | Converts radians to degrees. | =DEGREES(PI()) |
EVEN | EVEN(number) | Rounds away from zero to the next even integer. | =EVEN(3) |
FACT | FACT(number) | Returns factorial. | =FACT(5) |
FLOOR | FLOOR(number,number) | Rounds down to the nearest integer or multiple. | =FLOOR(12.9, 1) |
ISEVEN | ISEVEN(number) | Returns TRUE when the value is even. | =ISEVEN(4) |
ISODD | ISODD(number) | Returns TRUE when the value is odd. | =ISODD(5) |
ODD | ODD(number) | Rounds away from zero to the next odd integer. | =ODD(4) |
PI | PI() | Returns the value of $\pi$. | =PI() |
POWER | POWER(number,power) | Raises a number to a power. | =POWER(2, 3) |
QUOTIENT | QUOTIENT(number,number) | Returns the integer portion of division. | =QUOTIENT(7, 2) |
RAND | RAND() | Returns a random real number from 0 to less than 1. | =RAND() |
RANDBETWEEN | RANDBETWEEN(Bottom,Top) | Returns a random integer in a range. | =RANDBETWEEN(1, 10) |
ROUND | ROUND(number,number) | Rounds to a specified number of digits. | =ROUND(12.345, 2) |
SEC | SEC(number) | Returns the secant of an angle. | =SEC(0) |
SQRT | SQRT(number) | Returns the positive square root. | =SQRT(81) |
STANDARDIZE | STANDARDIZE(number,mean,standard_dev) | Returns a z-score style normalized value. | =STANDARDIZE(42, 40, 2) |
STDEV | STDEV(number,...) | Returns standard deviation. | =STDEV(1, 2, 3, 4) |
STDEVA | STDEVA(number,...) | Returns standard deviation using A-style handling. | =STDEVA(1, 2, 3, 4) |
STDEVP | STDEVP(number,...) | Returns population standard deviation. | =STDEVP(1, 2, 3, 4) |
STDEVPA | STDEVPA(number,...) | Returns population standard deviation using A-style handling. | =STDEVPA(1, 2, 3, 4) |
STDEVS | STDEVS(number,...) | Returns standard deviation for a series of values. | =STDEVS(1, 2, 3, 4) |
SUM | SUM(number1,number2,...) | Adds numeric values. | =SUM(1, 2, 3) |
SUMPRODUCT | SUMPRODUCT(range1,range2,...) | Multiplies matching items and adds the products. | =SUMPRODUCT(RANGE(2, 3), RANGE(4, 5)) |
Statistical functions
| Function | Syntax | What it does | Example |
|---|---|---|---|
ADDTOTAL | ADDTOTAL(number, key) | Adds a value to a named running total. Typically paired with GETTOTAL. | =ADDTOTAL(${LineAmount}, "invoiceTotal") |
AVEDEV | AVEDEV(number1,number2,...) | Returns average absolute deviation from the mean. | =AVEDEV(2, 4, 6, 8) |
AVERAGE | AVERAGE(number1,number2,...) | Returns the arithmetic mean. | =AVERAGE(2, 4, 6, 8) |
COUNT | COUNT(value1,value2,...) | Counts numeric values. | =COUNT(1, "x", 2) |
GETTOTAL | GETTOTAL(key) | Returns the current value of a named running total. | =GETTOTAL("invoiceTotal") |
MAX | MAX(number1,number2,...) | Returns the largest numeric value. | =MAX(10, 25, 3) |
MEDIAN | MEDIAN(number1,number2,...) | Returns the median. | =MEDIAN(1, 3, 5, 7, 9) |
MIN | MIN(number1,number2,...) | Returns the smallest numeric value. | =MIN(10, 25, 3) |
PERCENTILE.EXC | PERCENTILE.EXC(number1,number2,...,k) | Returns the exclusive percentile for $k$. | =PERCENTILE.EXC(1, 2, 3, 4, 0.75) |
PERCENTILE.INC | PERCENTILE.INC(number1,number2,...,k) | Returns the inclusive percentile for $k$. | =PERCENTILE.INC(1, 2, 3, 4, 0.75) |
PERCENTILERANK.EXC | PERCENTILERANK.EXC(number1,number2,...,x) | Returns the exclusive percentile rank for a value. | =PERCENTILERANK.EXC(1, 2, 3, 4, 3) |
PERCENTILERANK.INC | PERCENTILERANK.INC(number1,number2,...,x) | Returns the inclusive percentile rank for a value. | =PERCENTILERANK.INC(1, 2, 3, 4, 3) |
PRODUCT | PRODUCT(number1,number2,...) | Multiplies numeric values together. | =PRODUCT(2, 3, 4) |
ADDTOTAL() updates a running total and usually returns an empty string. Use GETTOTAL() where you want to display the accumulated value.
Date and time functions
| Function | Syntax | What it does | Example |
|---|---|---|---|
DATE | DATE(year,month,day) | Builds a UTC date from numeric parts. | =DATE(2026, 3, 25) |
DATEDATA | DATEDATA(text, input) | Reads date text using a supplied input format. | =DATEDATA("/order/date", "yyyy-MM-dd") |
DATEDIF | DATEDIF(start_date,end_date,unit) | Returns elapsed days, months, or years between two dates. | =DATEDIF(DATE(2026,1,1), DATE(2026,3,25), "d") |
DATESPAN | DATESPAN(years,months,days) | Creates a date offset span. | =DATE(2026,3,25) + DATESPAN(0, 1, 0) |
DATETIME | DATETIME(year,month,day,hour,minute,second) | Builds a UTC date/time value. | =DATETIME(2026, 3, 25, 14, 30, 0) |
DATEVALUE | DATEVALUE(year,month,day) | Returns the serial number for a date. | =DATEVALUE(2026, 3, 25) |
DAY | DAY(date) | Returns the day of month. | =DAY(DATE(2026, 3, 25)) |
DAYS | DAYS(date1, date2) | Returns the number of days between two dates. | =DAYS(DATE(2026,3,25), DATE(2026,3,1)) |
HOUR | HOUR(date) | Returns the hour from a date/time value. | =HOUR(DATETIME(2026,3,25,14,30,0)) |
MINUTE | MINUTE(date) | Returns the minute from a date/time value. | =MINUTE(DATETIME(2026,3,25,14,30,45)) |
MONTH | MONTH(date) | Returns the month number. | =MONTH(DATE(2026, 3, 25)) |
NOW | NOW() | Returns the current local date and time. | =NOW() |
OFFSETTOTALMINUTES | OffsetTotalMinutes(datetime) | Returns the time-zone offset in minutes. | =OFFSETTOTALMINUTES(NOW()) |
SECOND | SECOND(date) | Returns the second from a date/time value. | =SECOND(DATETIME(2026,3,25,14,30,45)) |
TIME | TIME(hour,minute,second) | Builds a time value. | =TIME(14, 30, 0) |
TIMESPAN | TIMESPAN(hours,minutes,seconds) | Creates a time offset span. | =TIME(8,0,0) + TIMESPAN(2,30,0) |
TIMEVALUE | TIMEVALUE(hour,minute,second) | Returns the decimal time value. | =TIMEVALUE(14, 30, 0) |
TIMEZONE | TimeZone(datetime) | Returns the timezone for a date/time value. | =TIMEZONE(NOW()) |
TODAY | TODAY() | Returns the current date in UTC. | =TODAY() |
TOLOCALTIME | ToLocalTime(date) | Converts a UTC date/time to local time. | =TOLOCALTIME(UTCNOW()) |
TOUTCTIME | ToUtcTime(date) | Converts a local date/time to UTC. | =TOUTCTIME(NOW()) |
UTCNOW | UTCNOW() | Returns the current UTC date and time. | =UTCNOW() |
WEEKDAY | WEEKDAY(date) | Returns the weekday number. | =WEEKDAY(TODAY()) |
WEEKNUM | WEEKNUM(date) | Returns the week number. | =WEEKNUM(TODAY()) |
WORKD.INTL | WORKD.INTL(year,month,day,days,weekend) | Returns a future workday using a custom weekend pattern. | =WORKD.INTL(2026,3,25,5,1) |
WORKDAY | WORKDAY(year,month,day,days,...) | Returns a future workday, optionally with holidays. | =WORKDAY(2026,3,25,5) |
YEAR | YEAR(date) | Returns the year. | =YEAR(TODAY()) |
YEARFRAC | YEARFRAC(date1, date2) | Returns the fraction of a year between two dates. | =YEARFRAC(DATE(2026,1,1), DATE(2026,12,31)) |
Text functions
| Function | Syntax | What it does | Example |
|---|---|---|---|
CHAR | CHAR(num) | Returns the character for a numeric code. | =CHAR(65) |
CONCATENATE | CONCATENATE(text,text) | Joins text values into one string. | =CONCATENATE("Hello ", "world") |
CONTAINS | CONTAINS(within_text,find_text) | Returns whether one text contains another. | =CONTAINS("Windward", "ward") |
ENDSWITH | EndsWith(within_text,final_text) | Returns whether text ends with a value. | =ENDSWITH("invoice.pdf", ".pdf") |
INDEXOF | INDEXOF(within_text,find_text) | Returns the first matching index. | =INDEXOF("Fluent Docs", "Docs") |
LASTINDEXOF | LASTINDEXOF(within_text,find_text) | Returns the last matching index. | =LASTINDEXOF("a,b,c,b", "b") |
LEFT | LEFT(text,num_chars) | Returns characters from the left side of text. | =LEFT("April", 2) |
LEN | LEN(text) | Returns text length. | =LEN("April") |
LOWER | LOWER(text) | Converts text to lowercase. | =LOWER("APRIL") |
MID | MID(text,start_num,num_chars) | Returns text starting at a position for a length. | =MID("Fluent", 2, 3) |
NUMBERVALUE | NUMBERVALUE(text,Decimal_separator,Group_separator) | Parses localized number text. | =NUMBERVALUE("1.234,56", ",", ".") |
PROPER | PROPER(text) | Converts text to proper case. | =PROPER("fluent DESIGNER") |
REGEXEXTRACT | REGEXEXTRACT(text,text) | Extracts text using a regular expression. | =REGEXEXTRACT("INV-1042", "INV-(\\d+)") |
REGEXMATCH | REGEXMATCH(text,text) | Tests whether text matches a regular expression. | =REGEXMATCH("INV-1042", "^INV-\\d+$") |
REGEXREPLACE | REGEXREPLACE(text,text,text) | Replaces text using a regular expression. | =REGEXREPLACE("555-123-4567", "\\D", "") |
REPLACE | REPLACE(text, pattern, replacement, ignoreCase) | Replaces matching text, optionally ignoring case. | =REPLACE("Northwind", "north", "Wind", TRUE()) |
RIGHT | RIGHT(text,num_chars) | Returns characters from the right side of text. | =RIGHT("April", 2) |
SEARCH | SEARCH(text,text,number) | Returns the position of the first match, optionally from a start position. | =SEARCH("Designer Docs", "Docs", 1) |
SPLIT | SPLIT(StringToSplit, SplitCharacters, [trim]) | Splits text into an array. | =SPLIT("red, green, blue", ",", TRUE()) |
STARTSWITH | StartsWith(within_text,initial_text) | Returns whether text starts with a value. | =STARTSWITH("invoice.pdf", "inv") |
SUBSTITUTE | SUBSTITUTE(text, old_text, new_text, instance_num) | Replaces all matches, or one specific occurrence. | =SUBSTITUTE("2026-03-25", "-", "/") |
SUBSTRING | SUBSTRING(text,start_num,end_num) | Returns text between start and end positions. | =SUBSTRING("Fluent", 1, 4) |
TEXT | TEXT(value, formatting) | Formats numbers or dates as text. | =TEXT(DATE(2026,3,25), "m/d/yyyy") |
TRIM | TRIM(text) | Removes whitespace from the beginning and end. | =TRIM(" hello ") |
UPPER | UPPER(text) | Converts text to uppercase. | =UPPER("April") |
URLDECODE | URLDECODE(url) | Decodes an encoded URL. | =URLDECODE("https://example.com/a%20b") |
URLENCODE | URLENCODE(url) | Encodes a URL. | =URLENCODE("https://example.com/a b") |
VALUE | VALUE(text) | Converts text to a number. | =VALUE("42.5") |
Logical, database, and array helper functions
| Function | Syntax | What it does | Example |
|---|---|---|---|
DATA | DATA(text) | Executes a select and returns the result for use inside another equation. | =SUM(DATA("select Amount from Orders")) |
DISTINCT | DISTINCT(sourceArray) | Removes duplicate values from an array. | =COUNT(DISTINCT(RANGE(1, 1, 2, 3))) |
FALSE | FALSE() | Returns the logical value false. | =FALSE() |
IF | IF(logical_test,value_if_true,value_if_false) | Returns one value when a condition is true and another when it is false. | =IF(${Amount} > 1000, "High", "Low") |
IFERROR | IFERROR(value, value_if_error) | Returns a fallback value when the first value errors. | =IFERROR(DATA("/root/phone"), "Not available") |
ISNUMBER | ISNUMBER(ANY) | Tests whether a value is numeric. | =ISNUMBER(VALUE("42")) |
NULL | NULL() | Returns a null value, commonly used for comparisons. | =DATA("/order/missing") = NULL() |
RANGE | RANGE(object1,object2,....) | Builds an array from a list of values. | =SUM(RANGE(1, 2, 3, 4)) |
RANGEARRAY | RANGEARRAY(start,end,[step],[unit]) | Builds an array across a range of values. | =RANGEARRAY(1, 10, 2) |
TRUE | TRUE() | Returns the logical value true. | =TRUE() |
XPATH | XPath(xml,xpath) | Evaluates an XPath expression against XML text. | =XPATH("<root><id>7</id></root>", "/root/id") |
Notes and caveats
- Function names are case-insensitive, even though the examples on this page use uppercase names.
- Some functions accept a variable number of arguments. Where that is the case, the syntax uses
.... - Array-returning helpers such as
RANGE,RANGEARRAY,SPLIT,DISTINCT, andDATAare most useful when nested inside other functions or when used within a forEach tag. WORKDAYcan also take holiday values after the core date and day arguments.IFERRORcan be helpful for missing query results, missing files, and unreachable URLs.