Skip to Content

Functions

This article 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

argument1: number; argument2: number

argument1: duration; argument2: duration

argument1: date/time; argument2: duration

Returns

number

duration

date/time

AND()  
Description Takes several 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, argument N...)
Arguments argument1, argument2, argument N...: 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, date/time, or duration. Must be a constant (i.e. 10, 20, not $number1, $number2)

argument2: a value of type number, date/time, 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
DATE()  
Description Declares a date in ISO format (example: «2013-12-21»). Date and time values are organized from the most to the last signigicant: year, month (or week), day, hour, minute, second, and fraction of second.
Function syntax DATE(argument1)
Arguments argument1: a value of date/time
Returns date/time
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: date/time
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: date/time

argument2: string

Returns number
DATETIMEFROMSECONDS()  
Description Converts number of seconds to a date.
Function syntax DATETIMEFROMSECONDS(argument1)
Arguments argument1: number
Returns date/time
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: date/time
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: date/time

argument2: string

Returns number
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: date/time
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: date/time
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: date/time

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: date/time
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: date/time

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: date/time
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: date/time

argument2: string

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: date/time
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: date/time

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
DURATION()  
Description Declares a duration in ISO format (P[n]Y[n]M[n]DT[n]H[n]M[n]S). The capital letters P, Y, M, W, D, T, H, M, A are designators for each of the date and time elements.
Function syntax DURATION("P[n]Y[n]M[n]DT[n]H[n]M[n]S")
Arguments  
Returns duration
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: number 
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, date/time, 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
ID()  
Description Declares an object. Takes a string, and returns an object identifier
Function syntax ID("argument1")
Arguments argument1: string
Returns The data type of the returned value is the same as the element type of the arguments.
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).
INDEXOF()  
Description Returns the zero-based index of the ocurrence of a given string in the original string.
Function syntax INDEXOF(argument1, argument2, [optional argument3]) 
Arguments argument1: source string
argument2: search string
Returns number
INDEXOFL()  
Description Returnd the zero-based index of the occurrence of a given string in the original string, starting from a certain character position.
Function syntax INDEXOFL(argument1, argument2, argument3) 
Arguments argument1: source string
argument2: search string
argument3: position number from which the counting is made
Returns number
INSECONDS()  
Description Converts duration value to seconds and vice versa.
Function syntax INSECONDS(argument1) 
Arguments argument1: duration, number
Returns number
ISTODAY()  
Description Returns true if a date is today. Returns false otherwise.
Function syntax ISTODAY(argument1)
Arguments argument1: date/time
Returns boolean
JOIN()  
Description Concatenates strings, with a given separator in between.
Function syntax JOIN(argument1, list(argument2, argument3,.. argument N))
Arguments argument1: string separator
argument2, argument3, ..., argument N (in the «list» function): concatenated strings
Returns string
LENGTH()  
Description Returns the number of characters in the string.
Function syntax LENGTH(argument1) 
Arguments argument1: string
Returns number
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, date/time, 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, date/time, or duration
Returns boolean
LIST()  
Description Defines a list. Takes an enumeration of values of the same type, separated by comma, and returns a list.
Function syntax LIST(argument1, …, argument N) 
Arguments argument1, …, argument N: values of the same type
Returns 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 date/time
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 date/time
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 date/time
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 date/time
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
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.
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
OR()  
Description Takes severalvalues 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, ... argument N)
Arguments argument1, argument2, ... argument N: 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 number
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
REPLACE()  
Description Replaces all occurrences of a given string in the original string with another string.
Function syntax REPLACE(argument1, argument2, argument3) 
Arguments argument1: source string
argument2: replacement string
argument3: new string
Returns string
ROUND()  
Description Rounds a number to the nearest integer.
Function syntax ROUND(argument1)
Arguments argument1: number
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: date/time
Returns date/time
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: date/time
Returns date/time
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: date/time
Returns date/time
SUBSTRING()  
Description Retrieves a substring of the string, starting at a given character position.
Function syntax SUBSTRING(argument1, argument2) 
Arguments argument1: string
argument2: substring position number (zero-based)
Returns string
SUBSTRINGL()  
Description Retrieves a substring of the string, starting at a given character position and having a certain length.
Function syntax SUBSTRING(argument1, argument2, argument3) 
Arguments argument1: string
argument2: substring position number (zero-based)
argument 3: number of characters in a substring
Returns string
SUBTRACT()  
Description Subtracts two values.
Function syntax SUBTRACT(argument1, argument2)
Arguments

argument1: number; argument2: number

argument1: duration; argument2: duration

argument1: datetime; argument2: duration

argument1: datetime; argument2: datetime

Returns

number

duration

date/time

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.
WORKDAYS()  
Description Returns a date based on the amount of work days since a certain date, adjusted for holidays and actual days off. If the time zone of the working office differs from the Comindware Tracker server time zone, use the WORKDAYSTZ() function.
Function syntax WORKDAYS(argument1, argument2, [optional list (argument3, argument4, ..., argument M)]) 
Arguments argument1: date/time start of work
argument2: number of working days
argument3, argument4, …, argument M (in the optional «list» function: holidays and exceptions from weekends, i.e. if a working day is indicated in the list, it is considered a holiday, and vice versa, if a weekend is in the list, it is considered a working day)
Returns date/time
WORKDAYSDURATION()  
Description Returnes the work duration between two dates, assuming that a work day starts at 00:00 and lasts 24 hours. If the time zone of the working office differs from the Comindware Tracker server time zone, use the WORKDAYSDURATIONTZ() function.
Function syntax WORKDAYSDURATION(argument1, argument 2, [optional list (argument3, argument4, …, argument M)])
Arguments argument1: date/time start of work
argument2: date/time end of work
argument3, argument4, …, argument M (in the optional «list» function: holidays and exceptions from weekends, i.e. if a working day is indicated in the list, it is considered a holiday, and vice versa, if a weekend is in the list, it is considered a working day)
Returns duration
WORKDAYSDURATIONTZ()  
Description Returns the work duration between two dates, adjusted for the working office time zone, assuming that a work day starts at 00:00 and lasts 24 hours.
Function syntax WORKDAYSDURATIONTZ(argument1, argument 2, [optional list (argument3, argument4, …, argument M)])
Arguments argument1: date/time start of work
argument2: date/time end of work
argument3, argument4, …, argument M (in the optional «list» function: holidays and exceptions from weekends, i.e. if a working day is indicated in the list, it is considered a holiday, and vice versa, if a weekend is in the list, it is considered a working day)
Returns duration
WORKDAYSTZ()  
Description Returns a date based on the amount of work days since a certain date, adjusted for holidays and actual days off, as well as for the working office time zone.
Function syntax WORKDAYSTZ(argument1, argument2, [optional list (argument3, argument4, ..., argument M)]) 
Arguments argument1: date/time start of work
argument2: number of working days
argument3, argument4, …, argument M (in the optional «list» function: holidays and exceptions from weekends, i.e. if a working day is indicated in the list, it is considered a holiday, and vice versa, if a weekend is in the list, it is considered a working day)
Returns date/time
WORKHOURS()  
Description Returns a date and time based on the amount of work hours since a certain point of time, adjusted for holidays and actual days off. If the time zone of the working office differs from the Comindware Tracker server time zone, use the WORKHOURSTZ() function.
Function syntax WORKHOURS(argument1, argument2, argument3, argument 4, [optional list (argument5, argument6, .., argument M)]) 
Arguments argument1: date/time start of work
argument2: number of working hours
argument3: time start of work
argument4: the length of the working day (must be less than the difference between 24 hours and the start time of the working day),
argument5, argument6, … argument M (in the optional «list» function: holidays and exceptions from weekends, i.e. if a working day is indicated in the list, it is considered a holiday, and vice versa, if a weekend is in the list, it is considered a working day)
Returns date/time
WORKHOURSDURATION()  
Description Returns the work duration between two dates, assuming that a work day starts at a given time and has a certain duration. If the time zone of the working office differs from the Comindware Tracker server time zone, use the WORKHOURSDURATIONTZ() function.
Function syntax WORKHOURSDURATION(argument1, argument2, argument3, argument 4, [optional list (argument5, argument6, .., argument M)]) 
Arguments argument1: date/time start of work
argument2: date/time end of work
argument3: time start of work
argument4: the length of the working day (must be less than the difference between 24 hours and the start time of the working day),
argument5, argument6, .., argument M (in the optional «list» function: holidays and exceptions from weekends, i.e. if a working day is indicated in the list, it is considered a holiday, and vice versa, if a weekend is in the list, it is considered a working day)
Returns duration
WORKHOURSDURATIONTZ()  
Description Returns the work duration between two dates, adjusted for the working office time zone, assuming that a work day starts at a given time and has a certain duration.
Function syntax WORKHOURSDURATION(argument1, argument2, argument3, argument 4, [optional list (argument5, argument6, .., argument M)]) 
Arguments argument1: date/time start of work
argument2: date/time end of work
argument3: time start of work
argument4: the length of the working day (must be less than the difference between 24 hours and the start time of the working day),
argument5, argument6, .., argument M (in the optional «list» function: holidays and exceptions from weekends, i.e. if a working day is indicated in the list, it is considered a holiday, and vice versa, if a weekend is in the list, it is considered a working day)
Returns duration
WORKHOURSTZ()  
Description Returns a date and time based on the amount of work hours since a certain point of time, adjusted for the working office time zone and adjusted for holidays and actual days off. 
Function syntax WORKHOURS(argument1, argument2, argument3, argument 4, [optional list (argument5, argument6, .., argument M)]) 
Arguments argument1: date/time start of work
argument2: number of working hours
argument3: time start of work
argument4: the length of the working day (must be less than the difference between 24 hours and the start time of the working day),
argument5, argument6, … argument M (in the optional «list» function: holidays and exceptions from weekends, i.e. if a working day is indicated in the list, it is considered a holiday, and vice versa, if a weekend is in the list, it is considered a working day)
Returns date/time