Skip to main content

Placeholders & functions

Placeholders let you inject the value of a field inside an e-mail message, the computed value of an auto field, or a Rich Text widget.

For instance, here's how you would use placeholders for an e-mail task:

Dear {customer.name} {customer.lastname},
thank you for your order. The total amount is {total} and the order ID is {id}.
Best regards

In this example, the placeholders {total} and {id} will be replaced with the values taken from the current record. The placeholders {customer.name} and {customer.lastname} will be replaced with the values of the record referenced by the customer field of the current record.

And here's how you would use placeholders for an auto field:

{name} {lastname}

This auto field will contain the concatenated values of the name and lastname fields of the current record.

Functions​

Sometimes you need to transform the referenced values. For example, you might want to make a string uppercase. It's easy: just type {UPPER(name)}.

You can also combine multiple functions, as in the following examples:

  • {UPPER(TRIM(lastname))} (this one will remove whitespace from the value before converting it to upper case)
  • {IF_TEXT(GT(price, 0), 'yes', 'no')} (this one will print yes if price is greater than 0, otherwise will print no)

Functions can also reference multiple fields. For instance, supposing you have two date fields called created and completed date, you can compute the number of days between them using {DAYS_TO(created, completed)}

Functions to be used on text fields:​

FunctionReturnsExampleDescription
LOWER(<text>)TextLOWER(name)Turns a given string to lower case.
UPPER(<text>)TextUPPER(name)Turns a given string to upper case.
LEFT(<text>, <num>)TextLEFT(name, 3)Returns the first num characters from the left of the string.
RIGHT(<text>, <num>)TextRIGHT(name, 3)Returns the last num characters from the right of the string.
SUBSTR(<text>, <from>, <num>)TextSUBSTR(name, 2, 3)Returns characters from the middle of the string, starting at position from and including num characters. The first character is numbered 1.
TRIM(<text> [, <char>])TextTRIM(name)Removes whitespace from the beginning and the end of the string. You can also pass a second argument to trim a specific character instead of spaces: TRIM(code, '-').
CONCAT(<text>, <text> [, ...])TextCONCAT(name, ' ', lastname)Joins two or more text values into a single string. You can pass additional arguments as needed.
IFEMPTY(<text>, <default>)TextIFEMPTY(name, 'n/a')Returns the first string if not empty, otherwise the string supplied as second argument. This is useful when you want to define a default value.
IF_TEXT(<condition>, <then> [, <else>])TextIF_TEXT(GT(total, 100), 'High', 'Low')Returns then when condition is true, otherwise else (or an empty string if else is omitted).
REGEXP_EXTRACT(<text>, <regex>)TextREGEXP_EXTRACT(code, '(..)$')Applies the given regular expression to the input value and returns the first parenthesised capture. The pattern used in the example will return the last two chars.
REGEXP_REPLACE(<text>, <regex>, <replace>)TextREGEXP_REPLACE(code, ' ', '_')Looks for the given regular expression and applies the given replacement string.
LPAD(<text>, <len>, <char>)TextLPAD(code, 10, '0')Left-pads the given string in order to make it at least len characters long by prepending the given char.
MD5(<text>)TextMD5(code)Computes the MD5 of the given string (in hex representation).
MD5_NUMERIC(<text>)TextMD5_NUMERIC(code)Computes a numeric hash derived from the MD5 of the string (useful when you need a stable integer-like fingerprint rather than hex text).
TEXT_EQ(<text>, <text>)BooleanTEXT_EQ(status, 'open')Returns true when the two text values are equal. Useful inside IF_TEXT() for string comparisons.

Functions to be used on numeric fields:​

FunctionReturnsExampleDescription
MIN(<num>, <num>)NumberMIN(field1, field2)Returns the lowest number between the two.
MAX(<num>, <num>)NumberMAX(field1, field2)Returns the highest number between the two.
HOURS_TO_HOURMIN(<num>)TextHOURS_TO_HOURMIN(field1)Treats the input variable as a number of hours and transforms it into a "HH:MM" duration string (for instance, 1.5 would be converted to 1:30).
MIN_TO_HOURMIN(<num>)TextMIN_TO_HOURMIN(field1)Treats the input variable as a number of minutes and transforms it into a "HH:MM" duration string (for instance, 90 would be converted to 1:30).
ROUND(<num>, <decimals>)NumberROUND(price, 2)Returns the number rounded to the given number of decimals.
FLOOR(<num>)NumberFLOOR(price)Returns the number rounded down to the nearest integer.
CEILING(<num>)NumberCEILING(price)Returns the number rounded up to the nearest integer.
ADD(<num>, <num>)NumberADD(price, 20)Sums the two arguments.
SUBTRACT(<num>, <num>)NumberSUBTRACT(price, 20)Subtracts the second argument from the first one.
MULTIPLY(<num>, <num>)NumberMULTIPLY(price, 1.2)Calculates the product of the two arguments.
DIVIDE(<num>, <num>)NumberDIVIDE(price, 2)Divides the first argument by the second one.
MOD(<num>, <num>)NumberMOD(price, 3)Divides the first argument by the second one and returns the remainder.
GT(<num>, <num>)BooleanGT(price, 100)Returns true if the first number is greater than the second.
LT(<num>, <num>)BooleanLT(qty, 1)Returns true if the first number is less than the second.

Functions to be used on date/time fields:​

FunctionReturnsExampleDescription
DATE(<year>, <month>, <day>)DateDATE(2026, 8, 10)Builds a date from year, month, and day numbers (month and day are clamped to valid ranges).
FORMAT(<date>, <format>)TextFORMAT(created, 'd/m/Y')Render the given date/time as a string using the supplied format. Valid format specifiers are Y (year), m (month), d (day), H (24-hour), h (12-hour), i (minutes), s (seconds), A (AM/PM).
ADD_MINUTES(<date>, <num>)Date/timeADD_MINUTES(created, 30)Adds the given number of minutes to the input date.
SUB_MINUTES(<date>, <num>)Date/timeSUB_MINUTES(created, 30)Subtracts the given number of minutes from the input date.
ADD_HOURS(<date>, <num>)Date/timeADD_HOURS(created, 2)Adds the given number of hours to the input date.
SUB_HOURS(<date>, <num>)Date/timeSUB_HOURS(created, 2)Subtracts the given number of hours from the input date.
ADD_DAYS(<date>, <num>)Date/timeADD_DAYS(created, 5)Adds the given number of days to the input date.
SUB_DAYS(<date>, <num>)Date/timeSUB_DAYS(created, 5)Subtracts the given number of days from the input date.
ADD_MONTHS(<date>, <num>)Date/timeADD_MONTHS(created, 1)Adds the given number of months to the input date.
SUB_MONTHS(<date>, <num>)Date/timeSUB_MONTHS(created, 1)Subtracts the given number of months from the input date.
ADD_YEARS(<date>, <num>)Date/timeADD_YEARS(created, 1)Adds the given number of years to the input date.
SUB_YEARS(<date>, <num>)Date/timeSUB_YEARS(created, 1)Subtracts the given number of years from the input date.
DAYS_TO(<date>, <date>)NumberDAYS_TO(created, completed)Calculates the difference in days between the supplied dates (second minus first).
TO_SECONDS(<datetime>)NumberTO_SECONDS(created)Converts a date/time or time value to seconds (Unix epoch for a full timestamp; seconds since midnight for a time-only value).
TO_MINUTES(<datetime>)NumberTO_MINUTES(created)Same as TO_SECONDS, then divided by 60 — useful for duration maths in minutes.
ADD_TIME_TO_DATE(<date>, <time>)Date/timeADD_TIME_TO_DATE(day, time)Combines a date and a time into a single date/time value.
TIME_DIFF(<datetime>, <datetime>)TimeTIME_DIFF(end, start)Returns the difference between two date/time (or time) values as a time-of-day interval.

Functions to be used only in tasks:​

The following functions can be used only in tasks or filenames and not in fields with automatic value, because they generate non-deterministic values:

FunctionReturnsExampleDescription
NOW()Date/timeNOW()Returns the current timestamp in the app Timezone (wall-clock local time, not UTC). You can format this with the FORMAT() function.
RANDBETWEEN(<min>, <max>)NumberRANDBETWEEN(111111, 999999)Generate a random number within the specified interval.

Do you need a function that is not implemented yet? Tell us ;-)