Text formulas


Several functions are available to help you process text strings. Use contains, startsWith, and endsWith to check for specific patterns within your text, and concat to combine multiple strings into one.

Text pattern matching functions

You can use contains, startsWith, and endsWith to check for patterns within text strings. All three share the same syntax, contains({text}, {substring}) and return either TRUE or FALSE. Regexp is not supported. Operations are case-insensitive.

If any arguments are not strings, they are converted to strings:

  • Any numbers are converted to strings.
  • Booleans are converted to 1 or 0.
  • undefined is converted to an empty string.

Example usages are provided below:

FormulaResult
startsWith("foobar", "foo")TRUE
startsWith("foobar", "")TRUE
startsWith("foobar", toDateTime(" 2023-13-01 10:45:49"))TRUE (because undefined was converted into an empty string)
endsWith("foobar", "bar")TRUE
contains("foobar", "bar")TRUE
contains("foobar", "BAR")TRUE (because comparisons are case-insensitive)
contains("bar", "foobar")FALSE

Concatenation function

The function concat lets you concatenate all arguments without separators.

If any arguments are not strings, they are converted to strings:

  • Any numbers are converted to strings.
  • Booleans are converted to 1 or 0.
  • undefined is converted to an empty string.

Example usages are provided below:

FormulaResult
concat("foobar", "bar")"foobarbar"
concat("foobar")"foobar"
concat("foobar",0)"foobar0"
concat(23)"23"
concat(23.2323)"23.2323"
concat(23,"133")"23133"
concat([23,"133"],undefined,"XX",FALSE)"23133XX0" (because undefined was converted into an empty string and FALSE was converted into 0)
concat(23,[[23,"133"],undefined,"XX",FALSE]],undefined,"XX",FALSE)"2323133XX0XX0"
concat(23,2)"232"
concat(55,undefined,"hello")"55hello"