Skip to content
flowon.com

Expression language

Conversion functions

Reference for the Conversion Functions category - turn text and numbers into whole numbers, decimals and Yes/No values safely.

The Conversion Functions category turns values into the type a slot needs. Use it when numbers or flags arrive as text, for example in an API request, an imported file, a free-text column, or a value extracted from an email with Extract with Pattern.

The conversion functions never fail the run. When a value cannot be converted, or is empty, they return the default you choose in Default if conversion fails.

To go the other way, from a number or date to text, use To String or Concatenate.

To Whole Number, To Decimal and Is Number read text in a language-neutral format:

Text Read as a number?
"1234", "1234.5", "-12", " 42 " Yes. A sign and surrounding spaces are allowed.
"1,234.5" Yes. , is the thousands separator and . the decimal point.
"١٬٢٣٤٫٥" Yes. Arabic-Indic digits and separators are accepted.
"1.234,5" (European style) No
"$1,234" (currency symbols) No
"1.2E3" (exponent notation) No
ToInteger(value, default)Returns Whole Number

Converts text or a number to a whole number.

Parameter Type Required Description
Value Text or any number Yes The value to convert.
Default if conversion fails Whole Number No Returned when the value is empty or cannot be converted. Defaults to 0.
  • The fraction is dropped, not rounded: 12.7 gives 12, and -12.7 gives -12. Use Round first if you want rounding.
  • A value too large for a Whole Number gives the default.

Example: ToInteger(new_externalscore, -1) reads a credit score sent as text and uses -1 to mark a missing or invalid score.

ToDecimal(value, default)Returns Decimal Number

Converts text or a number to a decimal number.

Parameter Type Required Description
Value Text or any number Yes The value to convert.
Default if conversion fails Decimal Number No Returned when the value is empty or cannot be converted. Defaults to 0.

Examples

  • ToDecimal(RegexExtract(description, "Amount: ([\d,.]+)", 1)) reads an amount from the text of an email.
  • ToDecimal(Quantity) / 2 keeps the fraction when dividing a Whole Number.
ToBoolean(value, default)Returns Yes/No

Converts text, a number or a Yes/No into a Yes/No.

Parameter Type Required Description
Value Text, any number or Yes/No Yes The value to convert.
Default if conversion fails Yes/No No Returned when the value is empty or not recognized. Defaults to No.
Value Result
"true", "yes", "1", "نعم" Yes
"false", "no", "0", "لا" No
Any number other than 0 Yes
0 No
Anything else, or empty The default
  • Text matching ignores case and surrounding spaces, so " YES " gives Yes.

Example: ToBoolean(Request.isUrgent, No) reads an “urgent” flag from a request your Logic API receives.

IsNumeric(text)Returns Yes/No

Returns Yes when a text can be read as a number, using the rules above.

Parameter Type Required Description
Text Text Yes The text to check. Empty text gives No.

Use it when you need to tell “not a number” apart from a real 0, which the conversion defaults cannot do on their own.

Example: in a validation, Or(Null Or Empty String(new_employeecount), IsNumeric(new_employeecount)) lets the field stay empty but rejects text such as “about 50”.