Comindware Knowledgebase

Functions

This topic describes the syntax and use of each function in the Comindware Expression Language.

ADD ()

Description

Adds two values. Strings concatenation is not supported.

Function syntax

ADD(argument1, argument2)

Arguments

a) argument1: number; argument2: number;
b) argument1: duration; argument2: duration;
c) argument1: datetime; argument2: duration.

Returns

a) number
b) duration
c) datetime

AND ()

Description

Takes two values of type boolean, or expressions that resolve to type boolean, and returns the result of a logical AND operation on the arguments.

Function syntax

AND(argument1, argument2)

Arguments

argument1, argument2: a value of type boolean, or an expression that resolves to type boolean.

Returns

boolean

AVERAGE ()

Description

Returns the average of all members of a given list.

Function syntax

AVERAGE(argument1)

Arguments

argument1: a list of numbers, durations, or dates.

Returns

The data type of the returned value is the same as the element type of the argument list.

CEIL ()

Description

Returns the value of a number rounded upwards to the nearest integer.

Function syntax

CEIL(argument1)

Arguments

argument1: number

Returns

number

CONCAT ()

Description

Takes a list of strings and combines the strings together to produce another string. Returns a concatenated string.

Function syntax

CONCAT(LIST(string1, string2,...., stringN))

Arguments

LIST(string1, string2,...., stringN): a list of strings.

Returns

string

CONTAINS ()

Description

Takes two arguments of the same type: a list as argument1 and a value as argument2. Returns true if argument2 is a member of the specified list, or false if not.

Function syntax

CONTAINS(argument1, argument2)

Arguments

argument1: a list of values of type number, datetime, or duration. Must be a constant (i.e. 10, 20, not $number1, $number2)

argument2: a value of type number, datetime, or duration.

Returns

boolean

COUNT ()

Description

Returns the number of elements in the argument list with any element type.

Function syntax

COUNT(argument1)

Arguments

argument1: a list with any element type.

Returns

number

CURRENTUSER

Description

Returns the identifier of the current user account.

Function syntax

CURRENTUSER

Arguments

requires no arguments

Returns

the identifier of the current user account

DATETIMEFROMSECONDS ()

Description

Converts number of seconds to a date.

Function syntax

DATETIMEFROMSECONDS(argument1)

Arguments

argument1: number

Returns

datetime

DATETIMEINSECONDS ()

Description

Converts a date to the number of seconds that have elapsed since 1970-01-01 00:00:00 (Unix time).

Function syntax

DATETIMEINSECONDS(argument1)

Arguments

argument1: datetime

Returns

number

DATETIMEYEAR ()

Description

Takes an argument of the datetime type and returns a value representing the year component of the given date in the local time zone.

Function syntax

DATETIMEYEAR(argument1)

Arguments

argument1: datetime

Returns

number

DATETIMEYEARTZ ()

Description

Takes two arguments and returns a value representing the year component of the given date (argument1) in the specified time zone (argument2). Time Zone ID should be specified in IANA Time Zone Database format.

Function syntax

DATETIMEYEARTZ(argument1, argument2)

Arguments

argument1: datetime

argument2: string

Returns

number

DATETIMEMONTH ()

Description

Takes an argument of the datetime type and returns a value representing the month component of the given date in the local time zone.

Function syntax

DATETIMEMONTH(argument1)

Arguments

argument1: datetime

Returns

number

DATETIMEMONTHTZ ()

Description

Takes two arguments and returns a value representing the month component of the given date (argument1) in the specified time zone (argument2). Time Zone ID should be specified in IANA Time Zone Database format.

Function syntax

DATETIMEMONTHTZ(argument1, argument2)

Arguments

argument1: datetime

argument2: string

Returns

number

DATETIMEDAY ()

Description

Takes an argument of the datetime type and returns a value representing the day component of the given date in the local time zone.

Function syntax

DATETIMEDAY(argument1)

Arguments

argument1: datetime

Returns

number

DATETIMEDAYTZ ()

Description

Takes two arguments and returns a value representing the day component of the given date (argument1) in the specified time zone (argument2). Time Zone ID should be specified in IANA Time Zone Database format.

Function syntax

DATETIMEDAYTZ(argument1, argument2)

Arguments

argument1: datetime

argument2: string

Returns

number

DATETIMEHOUR ()

Description

Takes an argument of the datetime type and returns a value representing the hour component of the given date in the local time zone.

Function syntax

DATETIMEHOUR(argument1)

Arguments

argument1: datetime

Returns

number

DATETIMEHOURTZ ()

Description

Takes two arguments and returns a value representing the hour component of the given date (argument1) in the specified time zone (argument2). Time Zone ID should be specified in IANA Time Zone Database format.

Function syntax

DATETIMEHOURTZ(argument1, argument2)

Arguments

argument1: datetime

argument2: string

Returns

number

DATETIMEMINUTE ()

Description

Takes an argument of the datetime type and returns a value representing the minute component of the given date in the local time zone.

Function syntax

DATETIMEMINUTE(argument1)

Arguments

argument1: datetime

Returns

number

DATETIMEMINUTETZ ()

Description

Takes two arguments and returns a value representing the minute component of the given date (argument1) in the specified time zone (argument2). Time Zone ID should be specified in IANA Time Zone Database format.

Function syntax

DATETIMEMINUTETZ(argument1, argument2)

Arguments

argument1: datetime

argument2: string

Returns

number

DATETIMESECOND ()

Description

Takes an argument of the datetime type and returns a value representing the seconds portion of the given date in the local time zone.

Function syntax

DATETIMESECOND(argument1)

Arguments

argument1: datetime

Returns

number

DATETIMESECONDTZ ()

Description

Takes two arguments and returns a value representing the seconds portion of the given date (argument1) in the specified time zone (argument2). Time Zone ID should be specified in IANA Time Zone Database format.

Function syntax

DATETIMESECONDTZ(argument1, argument2)

Arguments

argument1: datetime

argument2: string

Returns

number

DIVIDE ()

Description

Takes two arguments of the number type as dividend and divisor and returns the quotient.

Function syntax

DIVIDE(argument1, argument2)

Arguments

argument1 (dividend): number

argument2 (divisor): number

Returns

number

DURATIONFROMSECONDS ()

Description

Converts number of seconds to duration.

Function syntax

DURATIONFROMSECONDS(argument1)

Arguments

argument1: number

Returns

duration

DURATIONINSECONDS ()

Description

Converts a duration to the number of seconds.

Function syntax

DURATIONINSECONDS(argument1)

Arguments

argument1: duration

Returns

number

EMPTY ()

Description

Takes an expression that resolves to a value, and checks if it is empty.

Function syntax

EMPTY(argument1)

Arguments

argument1: a value of the same type as the expression's type.

Returns

boolean

EQUALS ()

Description

Takes two arguments and returns true if the first argument equals the second argument.

Function syntax

EQUALS(argument1, argument2)

Arguments

argument1, argument2: a value of any type.

Returns

boolean

FLOOR ()

Description

Returns the value of a number rounded downwards to the nearest integer.

Function syntax

FLOOR(argument1)

Arguments

argument1:

Returns

number

FORMAT ()

Description

Returns a formatted string for arguments argument0 through argumentN, each formatted according to a specification in format string.

Function syntax

FORMAT(format string, LIST(argument0, argument1, ..., argumentN))

The format for argument0 is specified with the portion of the format string that defines {0}. The format for argument1 is in the format-string portion that defines {1}, and so on.

The arguments must be in the form of the following pattern: LIST(argument1, argument2, ..., argumentN).

You can also concatenate strings using the FORMAT() function. For example, FORMAT("{0}, {1}", LIST($title, $assignee)).

Arguments

format string: string

argument1, argument2, ..., argumentN: values of any type.

Returns

string

GREATER ()

Description

Takes two arguments and returns true if the first argument is greater than the second argument.

Function syntax

GREATER(argument1, argument2)

Arguments

argument1, argument2: a value of type number, datetime, or duration.

Returns

boolean

GREATEREQ ()

Description

Takes two arguments and returns true if the first argument is greater than or equal to the second argument.

Function syntax

GREATEREQ(argument1, argument2)

Arguments

argument1, argument2: a value of type number, datetime, or duration.

Returns

boolean

IF ()

Description

Takes three arguments (values or expressions that resolve to values) and returns argument2 value if argument1 is true, or argument3 value if not.

Function syntax

IF(argument1, argument2, argument3)

Arguments

argument1: boolean, or an expression that resolves to type boolean.

argument2, argument3: a value of any type or an expression that resolves to value of any type.

Returns

The data type of the returned value is the same as the arguments (argument2 or argument3).

ISTODAY ()

Description

Returns true if a date is today. Returns false otherwise.

Function syntax

ISTODAY(argument1)

Arguments

argument1: datetime

Returns

boolean

LESS ()

Description

Takes two arguments and returns true if the first argument is less than the second argument.

Function syntax

LESS(argument1, argument2)

Arguments

argument1, argument2: a value of type number, datetime, or duration.

Returns

boolean

LESSEQ ()

Description

Takes two arguments and returns true if the first argument is less than or equal to the second argument.

Function syntax

LESSEQ(argument1, argument2)

Arguments

argument1, argument2: a value of type number, datetime, or duration.

Returns

boolean

MAX ()

Description

Returns the maximum value using the GREATER function across all arguments of a list, which must all be values of the same type or expressions resolving to the same data type.

Function syntax

MAX(argument1)

Arguments

argument1: a list of numbers, durations, or dates.

Returns

The data type of the returned value is the same as the element type of the argument list.

MAKEDATE ()

Description

Creates a date in the local time zone from the specified arguments of the number type.

Function syntax

MAKEDATE(argument1, argument2, argument3)

Arguments

argument1: a year component of the number type.

argument2: a month component of the number type.

argument3: a day component of the number type.

Returns

datetime

MAKEDATETZ ()

Description

Creates a date in the specified time zone from the arguments of the number type. Time Zone ID should be specified in IANA Time Zone Database format.

Function syntax

MAKEDATETZ(argument1, argument2, argument3, argument4)

Arguments

argument1: a year component of the number type.

argument2: a month component of the number type.

argument3: a day component of the number type.

argument4: Time Zone ID of the string type.

Returns

datetime

MAKEDATETIME ()

Description

Creates a date and time in the local time zone from the specified arguments of the number type.

Function syntax

MAKEDATETIME(argument1, argument2, argument3, argument4, argument5, argument6)

Arguments

argument1: a year component of the number type.

argument2: a month component of the number type.

argument3: a day component of the number type.

argument4: an hour component of the number type.

argument5: a minute component of the number type.

argument6: a seconds component of the number type.

Returns

datetime

MAKEDATETIMETZ ()

Description

Creates a date and time in the specified time zone from the arguments of the number type. Time Zone ID should be specified in IANA Time Zone Database format.

Function syntax

MAKEDATETIMETZ(argument1, argument2, argument3, argument4, argument5, argument6, argument7)

Arguments

argument1: a year component of the number type.

argument2: a month component of the number type.

argument3: a day component of the number type.

argument4: an hour component of the number type.

argument5: a minute component of the number type.

argument6: a seconds component of the number type.

argument7: Time Zone ID of the string type.

Returns

datetime

MATCHES ()

Description

Takes two arguments and returns true if the specified regular expression matches the entire specified string or any substring of the specified string. Returns false otherwise.

Function syntax

MATCHES(argument1, argument2)

Arguments

argument1: string

argument2: regular expression

Returns

boolean

MIN ()

Description

Returns the minimum value using the LESS function across all arguments of a list, which must all be values of the same type or expressions resolving to the same data type.

Function syntax

MIN(argument1)

Arguments

argument1: a list of numbers, durations, or dates.

Returns

The data type of the returned value is the same as the element type of the argument list.

NOT ()

Description

Takes a value of type boolean, or an expression that resolves to type boolean, and returns the result of a logical negation on the argument.

Function syntax

NOT(argument1)

Arguments

argument1: boolean

Returns

boolean

NOTCONTAINS ()

Description

Takes two arguments of the same type: a list as argument1 and a value as argument2. Returns true if argument2 is not a member of the specified list. Returns false otherwise.

Function syntax

NOTCONTAINS(argument1, argument2)

Arguments

argument1: list

argument2: value

Returns

boolean

NOTEQUALS ()

Description

Takes two arguments and returns true if the first argument is not equal to the second argument.

Function syntax

NOTEQUALS(argument1, argument2)

Arguments

argument1, argument2: a value of any type.

Returns

boolean

NOTMATCHES ()

Description

Takes two arguments and returns true if the specified regular expression does not match the entire specified string or any substring of the specified string. Returns false otherwise.

Function syntax

NOTMATCHES(argument1, argument2)

Arguments

argument1: string

argument2: regular expression

Returns

boolean

NOW

Description

Returns the current date and time.

Function syntax

NOW

Arguments

requires no arguments

Returns

current date and time

OR ()

Description

Takes two values of type boolean, or expressions that resolve to type boolean, and returns the result of a logical OR operation on the arguments.

Function syntax

OR(argument1, argument2)

Arguments

argument1, argument2: a value of type boolean, or an expression that resolves to type boolean.

Returns

boolean

PRODUCT ()

Description

Takes two arguments of the number type as multipliers and returns the product.

Function syntax

PRODUCT(argument1, argument2)

Arguments

argument1: number

argument2: number

Returns

number

QUOTIENT ()

Description

Takes two arguments of the number type as dividend and divisor, and returns the integer quotient.

Function syntax

QUOTIENT(argument1, argument2)

Arguments

argument1 (dividend): number

argument2 (divisor): number

Returns

integer

REMAINDER ()

Description

Takes two arguments of the number type as dividend and divisor, and returns the remainder after division.

Function syntax

REMAINDER(argument1, argument2)

Arguments

argument1 (dividend): number

argument2 (divisor): number

Returns

number

ROUND ()

Description

Rounds a number to the nearest integer.

Function syntax

ROUND(argument1)

Arguments

argument1

Returns

number

STARTOFDAY ()

Description

Takes an argument of the datetime type and returns a value representing the starting point of the day the given date is in.

Function syntax

STARTOFDAY(argument1)

Arguments

argument1: datetime

Returns

datetime

STARTOFWEEK ()

Description

Takes an argument of the datetime type and returns a value representing the starting point of the week containing the given date.

Function syntax

STARTOFWEEK(argument1)

Arguments

argument1: datetime

Returns

datetime

STARTOFMONTH ()

Description

Takes an argument of the datetime type and returns a value representing the starting point of the month the given date belongs to.

Function syntax

STARTOFMONTH(argument1)

Arguments

argument1: datetime

Returns

datetime

SUBTRACT ()

Description

Subtracts two values.

Function syntax

SUBTRACT(argument1, argument2)

Arguments

a) argument1: number; argument2: number
b) argument1: duration; argument2: duration
c) argument1: datetime; argument2: duration
d) argument1: datetime; argument2: datetime

Returns

a) number
b) duration
c) datetime
d) duration

SUM ()

Description

Returns the sum of all members of a given list. Strings concatenation is not supported.

Function syntax

SUM(argument1)

Arguments

argument1: a list of numbers, durations, or dates.

Returns

The type of the returned value is the same as the element type of the argument list.

Send you request to Comindware Still need help? Contact us

Back to top