Functions in Language Expressions

Use functions in expressions in the format where the function's name is given first followed by the expression in brackets. Separate arguments by comma. All functions are case sensitive and must be used in the configuration as described in the "Language expression" topic.

Examples for functions are:
  • toNumber("string expression")

  • if(activity.PROP_A1 > 10, 15, activity.PROP_A2 + 200)

  • toLowerCase(activity.PROP_A1) - is correct

  • tolowercase(activity.PROP_A1) - is incorrect

‘if’ function

The function consists of three attributes separated by comma. The function represents this logic: if attribute 1 is <some value> then set <some value> else set <other value>. Example: if (activity.PROP_A1 > 0,15, activity.PROP_A2+200)

`now` function

The function can be set as now("format") where the format can be DATE, DATETIME, TIMESTAMP. Include the value of the format between double quotes, similar to strings. Examples:
  • DATE - now("yyyy/MM/dd")

  • DATETIME - now("yyyy/MM/dd hh:mm:ss tt")

  • TIME - now("HH:mm:ss")

`toNumber` and `toString` functions

The rules described in the "Numbers and Strings" and "Properties and Fields" sections are applicable to the toNumber and toString functions. Examples:
  • toNumber("12345")

  • toNumber(activity.PROP_A1)

  • toString(1245)

  • toString(activity.PROP_A2)

'concat' function

The function can contain any number of operands separated by comma and placed in between brackets. Examples:
  • concat("abc", 15,"cde")

  • concat(activity.PROP_A1,activity_PROP_A2)

`toLowerCase` and `toUpperCase` functions

The functions are used to convert strings to lower or upper case. The functions contain only one operand placed in brackets. Examples:
  • toLowerCase("ABCD")

  • toLowerCase(activity.PROP_A1)

  • toUpperCase("abcd")

  • toUpperCase(activity.PROP_A1)

'empty' function

The function can be set with some field or property defined in brackets followed by the function. Examples:
  • empty(activity.PROP_A1)

  • if(empty(activity.PROP_A1),1000,activity.PROP_A2 +200)

  • NOT empty(activity.PROP_A1)

Activity type groups

You can configure a group of activity types for default values, validation rules, and visibility fields and properties. It is configured in the format of activity.awortype_group = "LABEL", where the value defining a label of an activity type group is included in double or single quotes. Examples:
  • activity.awortype_group = "internal"

  • activity.aworktype_group IN ('customer', 'maintenance')