Microflow Expressions

Last update: Download PDF Edit

Expressions can for example be used to change a member of an object based on logic. Variables in the microflow can be called in an expression by inserting the name of the variable and adding a dollar sign. E.g. $customer refers to the variable customer. Expressions can be used recursively, e.g., 1 + 2 + 3. Attributes and associations of object variables are accessed using a slash, e.g., $customer/Name, _$customer/CRM.CustomerOrder.

To illustrate this imagine an object with variable name package with two attributes: weight (float) and shippingCosts(currency). Rule: if the weight of a package is less than one kilogram there are no shipping costs. Otherwise the shipping costs are €5.00. The expression for changing attribute shippingCosts is: if $package/weight < 1.00 then 0.00 else 5.00.

An overview of the possibilities with expressions can be found below.

Unary Expressions:

Arithmetic Expressions:

Relational Expressions:

Special checks

And/Or expressions

If expressions

Mathematical function calls

  • max - Maximum of a list of numbers
  • min - Minimum of a list of numbers
  • not - Logical negation
  • round - Rounding a floating-point number.
  • round - Round with precision
  • random - Random number generation
  • floor - Rounding a floating-point number down.
  • ceil - Rounding a floating-point number up.
  • pow - Exponentiation
  • abs - Absolute value
  • currencyEquals / floatEquals - Equality of currency/floats for a certain precision

String function calls

  • toUpperCase - Convert string to uppercase
  • toLowerCase - Convert string to lowercase
  • length - String length
  • substring - Get part of a string
  • find - Get substring position
  • findLast - Get last substring position
  • contains - Contains substring
  • trim - Remove leading and trailing whitespace
  • isMatch - Match regular expression
  • replaceAll - Replace occurences of substring
  • replaceFirst - Replace first occurence of 
  • [startsWith](string-function-calls) - Determine whether a string starts with the specified substring

Date creation

  • dateTime - Creating a date value using the server’s calendar
  • dateTimeUTC - Creating a date value using the UTC calendar

Between date function calls

Add date function calls

Trim to date

To string

Parse integer

Parse/format float function calls

Parse/format date function calls

Enumerations in microflow expressions

  • getCaption - Get caption of enumeration value in current language
  • getKey - Get technical name of enumeration value