These are the functions that can be used within formulas.
abs(num) → Double
Returns absolute value of the argument
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: abs(TASK.fixedCost - TASK.estimatedCost)
acos(num) → Double
Returns value of the mathematical function acos
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: acos(BOOKING.estimatedDuration * 23.55)
aggregate(fld,filter,opt) → Object
Aggregate database records using a function type with the option to filter data
| Arguments | Class | Description |
|---|---|---|
| fld | Object | Database datapoint, e.g. STAFF.TASK.estimatedDuration |
| filter | Object | Datapoint filtering criteria specification or none |
| opt | String | Option specifying type of the calculations |
| 'count' | Counts number of the property values in data collection | |
| 'exists' | Check if there is at least one record that matches the filter conditions | |
| 'lookup' | Search data collection for a first value that matches the filter conditions | |
| 'max' | Finds maximum value of the property in data collection | |
| 'mean' | Calculates mean value of the property in data collection | |
| 'min' | Finds minimum value of the property in data collection | |
| 'sum' | Adds values of the property in data collection |
Example: aggregate(TASK.name, TASK.STAGE.name eq 'Completed', 'count')
and(bool1,bool2, ... ) → Boolean
Ensures that all provided operands are true
| Arguments | Class | Description |
|---|---|---|
| bool1 | Boolean | Logical value that is true or false |
Example: and(COMPANY.name eq 'Ninety Pixels', COMPANY.LOCATION.name neq 'Los Angeles')
asDate(str,opt) → Date
Convert formatted string to date
| Arguments | Class | Description |
|---|---|---|
| str | String | String representation of timestamp |
| opt | String | Option specifying timestamp format |
| 'dt' | Date formatted as 'yyyy-MM-dd' | |
| 'tm' | Time formatted as 'hh:mm' | |
| 'ts' | Timestamp formatted as 'yyyy-MM-dd hh:mm' |
Example: asDate('2026-12-14', 'dt')asin(num) → Double
Returns value of the mathematical function asin
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: asin(PROJECT.estimatedCost / 2500.00)atan(num) → Double
Returns value of the mathematical function atan
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: atan(ACTIVITY.fixedDuration - ACTIVITY.actualDuration)asTime(str,opt) → Long
Convert formatted string to epoch in milliseconds
| Arguments | Class | Description |
|---|---|---|
| str | String | String representation of timestamp |
| opt | String | Option specifying timestamp format |
| 'dt' | Date formatted as 'yyyy-MM-dd' | |
| 'tm' | Time formatted as 'hh:mm' | |
| 'ts' | Timestamp formatted as 'yyyy-MM-dd hh:mm' |
Example: asTime('09:45', 'tm')capitalize(txt) → String
Convert string to start from capital letter
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to convert |
Example: capitalize(CUSTOMER.name)
cbrt(num) → Double
Returns the cube root of the argument
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: cbrt(TASK.estimatedCost / TASK.REBATE.rebate)ceil(num) → Double
Returns the smallest mathematical integer that is greater than or equal to argument
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: ceil(TASK.fixedDuration * 1.5)concat(obj1,obj2, ... ) → String
Concatenation of the string arguments
| Arguments | Class | Description |
|---|---|---|
| obj1 | String | First argument to concatenate |
| obj2 | Object | Second argument to concatenate, and more arguments to follow |
Example: concat('Staff overhead cost is: ', ROUND(STAFF.payAmount * 1.25), ' USD')convertCurrency(base,num,quote) → Double
Convert currency
| Arguments | Class | Description |
|---|---|---|
| base | String | Base currency identifier as ISO-4217 standard |
| num | Double | Amount of base currency to convert |
| quote | String | Local currency identifier as ISO-4217 standard |
Example: convertCurrency('EUR', TASK.estimatedCost, 'USD')convertDate(dt,opt) → Long
Convert date to specific value
| Arguments | Class | Description |
|---|---|---|
| dt | Date | Date to convert |
| opt | String | Option specifying type of conversion |
| 'day' | Get number of day in range 1..31 | |
| 'hour' | Get hour in range 0..23 | |
| 'minute' | Get minute in range 0..59 | |
| 'month' | Get number of month in range 1..12 | |
| 'ms' | Get time in milliseconds | |
| 'second' | Get second in range 0..59 | |
| 'weekday' | Get number of weekday in range 1..7 | |
| 'year' | Get modern year number, e.g. 2021 |
Example: convertDate(BOOKING.beginDate, 'month')convertDuration(tms,opt) → Double
Convert duration from milliseconds to specific value
| Arguments | Class | Description |
|---|---|---|
| tms | Long | Number of milliseconds to convert |
| opt | String | Option specifying type of conversion |
| 'days' | Get number of working days | |
| 'hours' | Get number of working hours | |
| 'minutes' | Get number of working minutes | |
| 'months' | Get number of working months | |
| 'seconds' | Get number of working seconds | |
| 'weeks' | Get number of working weeks | |
| 'years' | Get number of working years |
Example: convertDuration(BOOKING.estimatedDuration, 'days')convertFileSize(cnt,opt) → Double
Convert number of bytes to file size measurement unit
| Arguments | Class | Description |
|---|---|---|
| cnt | Long | Number of bytes to convert |
| opt | String | Option specifying type of conversion |
| 'GB' | Get file decimal size in Gigabytes | |
| 'GiB' | Get file binary size in Gigabytes | |
| 'KB' | Get file decimal size in Kilobytes | |
| 'KiB' | Get file binary size in Kilobytes | |
| 'MB' | Get file decimal size in Megabytes | |
| 'MiB' | Get file binary size in Megabytes | |
| 'TB' | Get file decimal size in Terabytes | |
| 'TiB' | Get file binary size in Terabytes |
Example: convertFileSize(STORAGE_FILE.size, 'KB')cos(num) → Double
Returns value of the mathematical function cos
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: cos(TASK.actualDuration / 35.20)cosh(num) → Double
Returns value of the mathematical function cosh
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: cosh(PROJECT.fixedCost / PROJECT.estimatedCost)
count(fld,filter) → Long
Aggregate records in database by count values with the option to filter the records
| Arguments | Class | Description |
|---|---|---|
| fld | Object | Database datapoint, e.g. STAFF.TASK.estimatedDuration |
| filter | Boolean | Datapoint filtering criteria specification or none |
Example: count(STAFF.TASK.estimatedDuration, STAFF.LOCATION.name eq 'Los Angeles')countDate(dt,opt) → Long
Count specific value of time units
| Arguments | Class | Description |
|---|---|---|
| dt | Date | Date used for counting |
| opt | String | Option specifying the unit to count |
| 'days' | Count days since 1970 | |
| 'hours' | Count hours since 1970 | |
| 'minutes' | Count minutes since 1970 | |
| 'months' | Count months since 1970 | |
| 'ms' | Count milliseconds since 1970 | |
| 'weeks' | Count weeks since 1970 | |
| 'years' | Count years since 1970 |
Example: countDate(TASK.startTime, 'days')countTime(dt,opt) → Long
Count specific value of time units
| Arguments | Class | Description |
|---|---|---|
| dt | Long | Time in milliseconds |
| opt | String | Option specifying the unit to count |
| 'days' | Count days since 1970 | |
| 'hours' | Count hours since 1970 | |
| 'minutes' | Count minutes since 1970 | |
| 'months' | Count months since 1970 | |
| 'ms' | Count milliseconds since 1970 | |
| 'weeks' | Count weeks since 1970 | |
| 'years' | Count years since 1970 |
Example: countTime(TASK.closeTime - TASK.startTime, 'hours')dbExists(filter) → Boolean
Check if there is at least one record with the property
| Arguments | Class | Description |
|---|---|---|
| filter | Boolean | Datapoint filtering criteria or just datapoint for all available |
Example: dbExists(TASK.STAGE.name eq 'Completed')
dbNull(fld,val) → Object
Retrieve value of database record property, and substitute by default value if not found
| Arguments | Class | Description |
|---|---|---|
| fld | Object | Database datapoint, e.g. STAFF.name |
| const | Object | Default value as constant |
Example: dbNull(PROJECT.fixedCost, 0.0)
dbTrue(filter) → Object
Use value of database record property if matching filter, otherwise use default value
| Arguments | Class | Description |
|---|---|---|
| filter | Boolean | Datapoint filtering criteria specification by triple Datapoint Predicate Constant |
Example: dbTrue(TASK.name eq "Concept")
divide(num1,num2,val) → String
Divide num1 by num2 or substitute by default value if division is not allowed
| Arguments | Class | Description |
|---|---|---|
| num1 | String | Dividend, number being divided |
| num2 | Object | Divisor, number that divides dividend |
| const | Object | Default value as constant |
Example: divide(STAFF.payAmount, 365, 0)
enumName(fld) → String
Use enumeration key
| Arguments | Class | Description |
|---|---|---|
| fld | Object | Database datapoint, e.g. TASK.taskType |
Example: enumName(TASK.taskType)
exists(fld,filter) → Boolean
Check if there is at least one record that matches the filter conditions
| Arguments | Class | Description |
|---|---|---|
| fld | Object | Database datapoint, e.g. STAFF.TASK.estimatedDuration |
| filter | Boolean | Datapoint filtering criteria specification or none to get one |
Example: exists(COMPANY.name, COMPANY.LOCATION.name eq 'Los Angeles')exp(num) → Double
Returns raising Euler's number to the power of the value of the argument
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: exp(REBATE.rebate / 55.0)floor(num) → Double
Returns the largest mathematical integer that is less than or equal to argument
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: floor(PROJECT.estimatedCost)formatDate(dt,fmt) → String
Format number to a string
| Arguments | Class | Description |
|---|---|---|
| dt | Date | Date to format |
| fmt | String | Format specification as ISO-8601 standard |
Example: formatDate(BOOKING.beginDate, "YYYY-MM-DDThh:mm:sZ")formatDuration(tms,opt) → String
Format duration from milliseconds to duration units
| Arguments | Class | Description |
|---|---|---|
| tms | Long | Number of milliseconds to format |
| opt | String | Option specifying type of conversion |
| 'days' | Get number of working days with unit 'D' | |
| 'hours' | Get number of working hours with unit 'h' | |
| 'minutes' | Get number of working minutes with unit m' | |
| 'months' | Get number of working months with unit 'M' | |
| 'seconds' | Get number of working seconds with unit 's' | |
| 'weeks' | Get number of working weeks with unit 'w' | |
| 'years' | Get number of working years with unit 'Y' |
Example: formatDuration(ACTIVITY.estimatedDuration, 'weeks')formatFileSize(cnt,opt) → String
Format number of bytes to file size measurement units
| Arguments | Class | Description |
|---|---|---|
| cnt | Long | Number of bytes to convert |
| opt | String | Option specifying type of conversion |
| 'GB' | Get file decimal size in Gigabytes | |
| 'GiB' | Get file binary size in Gigabytes | |
| 'KB' | Get file decimal size in Kilobytes | |
| 'KiB' | Get file binary size in Kilobytes | |
| 'MB' | Get file decimal size in Megabytes | |
| 'MiB' | Get file binary size in Megabytes | |
| 'TB' | Get file decimal size in Terabytes | |
| 'TiB' | Get file binary size in Terabytes |
Example: formatFileSize(STORAGE_FILE.size, 'KB')formatNumber(num,fmt) → String
Format number to a string
| Arguments | Class | Description |
|---|---|---|
| num | Long | Number to format |
| fmt | String | Format specification as Java standard |
| '10xSpaces' | Fit number to 10 characters width, leading with spaces | |
| '10xZeros' | Fit number to 10 characters width, leading with zeros | |
| '19xSpaces' | Fit number to 19 characters width, leading with spaces | |
| '19xZeros' | Fit number to 19 characters width, leading with zeros | |
| 'USD' | Convert to selected currency (USD, EUR, GBP...) and apply financial format with code suffix | |
| 'commas' | Split number in to groups of 3 digits, e.g. 12,345 | |
| 'currency' | Add $ character, groups of 3 digits with two decimal points, e.g. $1,234.56 | |
| 'financial' | Add $ character prefix and adjust to two decimal points, e.g. $123.45 | |
| 'kilo' | Format number by kilo-measurements, e.g. 123.45k |
Example: formatNumber(BOOKING.estimatedCost, 'currency')formatTime(tms,fmt) → String
Format number of milliseconds to a string
| Arguments | Class | Description |
|---|---|---|
| tms | Long | Number of milliseconds to format |
| fmt | String | Format specification as ISO-8601 standard |
Example: formatTime(BOOKING.beginDate, 'hh:mm:ss')getDate(opt) → Date
Date system values
| Arguments | Class | Description |
|---|---|---|
| opt | String | Option specifying type of the date |
| 'local' | Current Local Time Stamp (Date and Time) | |
| 'max' | Date in year 3000 (as Projectal maximum date) | |
| 'min' | Date in 1970 (zero) | |
| 'now' | Current UTC Time Stamp (Date and Time) |
Example: getDate('now')getLong(opt) → Long
Get system long number
| Arguments | Class | Description |
|---|---|---|
| opt | String | Option specifying type of the value |
| 'max' | Get minimum value | |
| 'min' | Get maximum value |
Example: getLong('max')getReal(opt) → Long
Get system float number
| Arguments | Class | Description |
|---|---|---|
| opt | String | Option specifying type of the value |
| 'max' | Get minimum value | |
| 'min' | Get maximum value |
Example: getReal('min')getTime(opt) → Long
Date system values
| Arguments | Class | Description |
|---|---|---|
| opt | String | Option specifying type of the date |
| 'local' | Current Local Time Stamp in milliseconds | |
| 'max' | Time in milliseconds at year 3000 (as Projectal maximum date) | |
| 'min' | Time in milliseconds in 1970 (zero) | |
| 'now' | Current UTC Time Stamp in milliseconds |
Example: getTime('now')if(ask,val1,val2) → Object
Conditional value of argument one or argument two
| Arguments | Class | Description |
|---|---|---|
| ask | Boolean | Logical condition |
| val1 | Object | Value returned if the condition is true |
| val2 | Object | Value returned if the condition is false |
Example: if(TASK.progress gt 0.1, "In Progress", "Not started")ifNull(num,val) → Object
Use alternative value if the argument is null
| Arguments | Class | Description |
|---|---|---|
| num | Object | Object to test for null |
| const | Object | Default value as constant |
Example: ifNull(BOOKING.fixedCost, 0.0)ifZero(num,val) → Object
Use alternative value if the argument is zero or null
| Arguments | Class | Description |
|---|---|---|
| num | Object | Number to test for zero, null or empty string |
| const | Object | Default value as constant |
Example: ifZero(STAFF.payAmount, "Staff has no salary")isNumber(obj) → Boolean
Check if the object is a number
| Arguments | Class | Description |
|---|---|---|
| obj | Object | Value of unknown type |
Example: isNumber(SKILL.customFieldABC)length(str) → Integer
Get length of the string
| Arguments | Class | Description |
|---|---|---|
| str | String | String of characters |
Example: length(PROJECT.description)log(num) → Double
Returns result of computing the natural logarithm of the argument
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: log(PROJECT.estimatedCost / PROJECT.REBATE.rebate)log10(num) → Double
Returns result of computing the base 10 logarithm of the argument
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: log10(TASK.actualDuration - TASK.customOverheadOffset)lookup(fld,filter) → Object
Search data collection for a first value that matches the filter conditions
| Arguments | Class | Description |
|---|---|---|
| fld | Object | Database datapoint, e.g. STAFF.TASK.estimatedDuration |
| filter | Boolean | Datapoint filtering criteria specification or none to get first found |
Example: lookup(COMPANY.customMarginRate, COMPANY.name eq 'Ninety Pixels')lowerCase(txt) → String
Convert string to lower case of letters
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to convert |
Example: lowerCase(STAFF.name)max(fld,filter) → Double
Aggregate records in database by maximum value with the option to filter the records
| Arguments | Class | Description |
|---|---|---|
| fld | Double | Database datapoint, e.g. STAFF.TASK.estimatedDuration |
| filter | Boolean | Datapoint filtering criteria specification or none |
Example: max(TASK.estimatedDuration, TASK.STAGE.name eq 'In Progress')maxValue(num1,num2) → Double
Returns the greater of two values
| Arguments | Class | Description |
|---|---|---|
| num1 | Double | First number to compare |
| num2 | Double | Second number to compare |
Example: maxValue(BOOKING.estimatedCost, 12000.00)
mean(fld,filter) → Double
Aggregate records in database by mean value with the option to filter the records
| Arguments | Class | Description |
|---|---|---|
| fld | Double | Database datapoint, e.g. STAFF.TASK.estimatedDuration |
| filter | Boolean | Datapoint filtering criteria specification or none |
Example: mean(PROJECT.TASK.estimatedDuration, none)min(fld,filter) → Double
Aggregate records in database by minimum value with the option to filter the records
| Arguments | Class | Description |
|---|---|---|
| fld | Double | Database datapoint, e.g. STAFF.TASK.estimatedDuration |
| filter | Boolean | Datapoint filtering criteria specification or none |
Example: min(PROJECT.actualCost, PROJECT.STAGE.name eq 'Completed')minValue(num1,num2) → Double
Returns the smaller of two values
| Arguments | Class | Description |
|---|---|---|
| num1 | Double | First number to compare |
| num2 | Double | Second number to compare |
Example: minValue(STAFF.payAmount * 12, TASK.estimatedCost)not(bool) → Boolean
Negates provided logical argument
| Arguments | Class | Description |
|---|---|---|
| bool | Boolean | Logical value that is true or false |
Example: not(STAFF.genericStaff)officeHours(opt) → Long
Configuration of the office working hours
| Arguments | Class | Description |
|---|---|---|
| opt | String | Option specifying type of the settings |
| 'closed' | Closing office hours (e.g. 17:00) | |
| 'open' | Opening office hours (e.g. 09:00) |
Example: officeHours('open')offsetDate(dt,opt) → Date
Convert date from UTC to regional zone
| Arguments | Class | Description |
|---|---|---|
| dt | Date | Date to convert |
| opt | String | Option specifying time zone |
| '+00h DTS' | Europe/London | |
| '+01h' | Europe/Warsaw | |
| '+01h DTS' | Europe/Warsaw | |
| '+02h' | Europe/Helsinki | |
| '+02h DTS' | Europe/Helsinki | |
| '+03h' | Europe/Istanbul | |
| '+04h' | Asia/Duba | |
| '+05h' | Indian/Maldives | |
| '+06h' | Asia/Omsk | |
| '+07h' | Asia/Bangkok | |
| '+08h' | Asia/Singapore | |
| '+09h' | Asia/Tokyo | |
| '+10h' | Australia/Melbourne | |
| '+10h DTS' | Australia/Melbourne | |
| '+11h' | Pacific/Norfolk | |
| '+11h DTS' | Pacific/Norfolk | |
| '+12h' | New Zealand | |
| '+12h DTS' | Pacific/Auckland | |
| '-01h DTS' | Atlantic/Azores | |
| '-02h DTS' | America/Godthab | |
| '-03h DTS' | America/Miquelon | |
| '-04h DTS' | America/Halifax | |
| '-05h DTS' | America/Detroit | |
| '-06h DTS' | America/Chicago | |
| '-10h DTS' | America/Atka | |
| '−03h' | America/Buenos_Aires | |
| '−04h' | America/Puerto_Rico | |
| '−05h' | America/Panama | |
| '−06h' | America/Chicago | |
| '−07h' | America/Denver | |
| '−07h DTS' | America/Denver | |
| '−08h' | America/Los_Angeles | |
| '−08h DTS' | US/Pacific | |
| '−09h' | US/Alaska | |
| '−09h DTS' | America/Sitka | |
| '−10h' | Pacific/Honolulu | |
| '−11h' | Pacific/Samoa |
Example: offsetDate(BOOKING.beginDate, '-08h')offsetTime(dt,opt) → Long
Convert date from UTC to regional zone
| Arguments | Class | Description |
|---|---|---|
| dt | Date | Date to convert |
| opt | String | Option specifying time zone |
| '+00h DTS' | Europe/London | |
| '+01h' | Europe/Warsaw | |
| '+01h DTS' | Europe/Warsaw | |
| '+02h' | Europe/Helsinki | |
| '+02h DTS' | Europe/Helsinki | |
| '+03h' | Europe/Istanbul | |
| '+04h' | Asia/Duba | |
| '+05h' | Indian/Maldives | |
| '+06h' | Asia/Omsk | |
| '+07h' | Asia/Bangkok | |
| '+08h' | Asia/Singapore | |
| '+09h' | Asia/Tokyo | |
| '+10h' | Australia/Melbourne | |
| '+10h DTS' | Australia/Melbourne | |
| '+11h' | Pacific/Norfolk | |
| '+11h DTS' | Pacific/Norfolk | |
| '+12h' | New Zealand | |
| '+12h DTS' | Pacific/Auckland | |
| '-01h DTS' | Atlantic/Azores | |
| '-02h DTS' | America/Godthab | |
| '-03h DTS' | America/Miquelon | |
| '-04h DTS' | America/Halifax | |
| '-05h DTS' | America/Detroit | |
| '-06h DTS' | America/Chicago | |
| '-10h DTS' | America/Atka | |
| '−03h' | America/Buenos_Aires | |
| '−04h' | America/Puerto_Rico | |
| '−05h' | America/Panama | |
| '−06h' | America/Chicago | |
| '−07h' | America/Denver | |
| '−07h DTS' | America/Denver | |
| '−08h' | America/Los_Angeles | |
| '−08h DTS' | US/Pacific | |
| '−09h' | US/Alaska | |
| '−09h DTS' | America/Sitka | |
| '−10h' | Pacific/Honolulu | |
| '−11h' | Pacific/Samoa |
Example: offsetTime(STAFF.startDate, '+09h')or(bool1,bool2, ... ) → Boolean
Ensures that at least of provided operands is true
| Arguments | Class | Description |
|---|---|---|
| bool1 | Boolean | Logical value that is true or false |
Example: or(PROJECT.STAGE.name eq 'Completed', PROJECT.STAGE.name eq 'Bidding')powValue(num,pow) → Double
Returns the value of the first argument raised to the power of the second argument
| Arguments | Class | Description |
|---|---|---|
| num | Double | Base value |
| exp | Double | Exponent to which the base number is raised. |
Example: powValue(REBATE.rebate, 2.0)random() → Double
Random floating number between 0.0 and 1.0
Example: random()reverse(txt) → String
Reverse letters of the string
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to convert |
Example: reverse(STAFF.identifier)rint(num) → Double
Returns the value that is closest to integer
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: rint(TASK.actualCost)round(num) → Long
Rounds numeric value to the the nearest integer value
| Arguments | Class | Description |
|---|---|---|
| num | Double | Floating point number |
Example: round(PROJECT.estimatedDuration * 1.25)round2(num) → Double
Rounds numeric value to 2 decimal places
| Arguments | Class | Description |
|---|---|---|
| num | Integer | Floating point number |
Example: round2(BOOKING.estimatedCost / 0.85)signum(num) → Double
Returns 0 if the argument is zero, -1 if is negative, and 1 if is positive
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: signum(PROJECT.fixedCost - PROJECT.actualCost)
sin(num) → Double
Returns value of the mathematical function sin
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: sin(ACTIVITY.actualDuration / 47.50)sinh(num) → Double
Returns value of the mathematical function sinh
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: sinh(RESOURCE.resourceQuota / 50.0)sqrt(num) → Double
Returns value of the mathematical function sqrt
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: sqrt(COMPANY.customOverhead)sum(fld,filter) → Double
Aggregate records in database by total value with the option to filter the records
| Arguments | Class | Description |
|---|---|---|
| fld | Double | Database datapoint, e.g. STAFF.TASK.estimatedDuration |
| filter | Boolean | Datapoint filtering criteria specification or none |
Example: sum(STAFF.payAmount, STAFF.genericStaff eq false)switch(ask,key,val, ... , none,nil ) → Object
Conditional value of one of the arguments
| Arguments | Class | Description |
|---|---|---|
| aim | Boolean | Value, database datapoint or expression, e.g. TASK.priority |
| key | Object | Constant value to match for the next argument |
| val | Object | Value returned if field is having the key |
| none | Object | Keyword used if none of the previously specified values is matched |
| nil | Object | Value returned if field is not having any of the keys specified |
Example: switch(STAFF.staffType,'Full Time','Full Time Employee', 'Freelancer','Contractor', none,'Intern')
tan(num) → Double
Returns value of the mathematical function tan
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: tan(RESOURCE.resourceQuota / 365.0)tanh(num) → Double
Returns value of the mathematical function tanh
| Arguments | Class | Description |
|---|---|---|
| num | Double | Decimal number |
Example: tanh(TASK.actualDuration / TASK.fixedDuration)textAfter(txt,chr) → String
Get letters after selected character(s)
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to extract from |
| chr | String | Character(s) to select |
Example: textAfter(PROJECT.identifier, 'PRJ-')textBefore(txt,chr) → String
Get letters before selected character(s)
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to extract from |
| chr | String | Character(s) to select |
Example: textBefore(LOCATION.street, 'Road')textBetween(txt,ch1,ch2) → String
Get letters between selected character(s)
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to extract from |
| ch1 | String | Starting character(s) to select |
| ch2 | String | Ending character(s) to select |
Example: textBetween(BOOKING.description, '==Start Desc==', '==End Desc==')
textContains(txt,str) → Boolean
Checks whether a text contains a sequence of letters
| Arguments | Class | Description |
|---|---|---|
| txt | String | Text to check for sequence |
| str | String | Sequence of letters |
Example: textContains(PROJECT.description, 'animation')textHead(txt,num) → String
Drops number of letters from the tail of string
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to extract from |
| num | Integer | Number of characters to drop |
Example: textHead(TASK.identifier, '-TASKCODE')textIsNumber(str) → Boolean
Check if the string is representing a number
| Arguments | Class | Description |
|---|---|---|
| str | String | A string too check |
Example: textIsNumber(BOOKING.identifier)textLeft(txt,num) → String
Get number of letters from the left side
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to extract from |
| num | Integer | Number of characters to extract |
Example: textLeft(STAFF.identifier, 10)textMatches(txt,rex) → Boolean
Checks whether a text contains regular expression
| Arguments | Class | Description |
|---|---|---|
| txt | String | Text to check for regular expression |
| rex | String | Regular expression as Java standard |
Example: textMatches(TASK.name, '^Layout-\\d{5}$')
textRight(txt,num) → String
Get number of letters from the right side
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to extract from |
| num | Integer | Number of characters to extract |
Example: textRight(STAFF.identifier, 'EMPNUM-')textTail(txt,num) → String
Drops number of letters from the head of string
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to extract from |
| num | Integer | Number of characters to drop |
Example: textTail(RESOURCE.name, 12)toDate(str) → Date
Convert 'yyyy-MM-dd hh:mm' formatted date and time
| Arguments | Class | Description |
|---|---|---|
| str | String | String representing timestamp |
Example: toDate('2026-12-15 09:00')toJson(str) → JsonNode
Convert string to JSON
| Arguments | Class | Description |
|---|---|---|
| str | String | String representation of JSON code |
Example: toJson('{ "name" : "Jane Doe", "staff type" : "full time", "location" : "Canada" }')toLong(obj) → String
Convert object to long number
| Arguments | Class | Description |
|---|---|---|
| obj | Object | Object to convert |
Example: toLong(TASK.estimatedCost * 1.25)toString(obj) → String
Convert object to a string
| Arguments | Class | Description |
|---|---|---|
| obj | Object | Object to convert |
Example: toString(BOOKING.fixedCost + 1200)toTime(str) → Long
Convert 'yyyy-MM-dd hh:mm' formatted date and time
| Arguments | Class | Description |
|---|---|---|
| str | String | String representing timestamp |
Example: toTime('2026-09-26 00:00:00')toUuId(hex) → UUID
Convert string to UUID
| Arguments | Class | Description |
|---|---|---|
| hex | String | String representation of UUID |
Example: toUuId('2f7d3948-42fa-4d1e-8b6a-91bf71887f4c')
upperCase(txt) → String
Convert string to upper case of letters
| Arguments | Class | Description |
|---|---|---|
| txt | String | String to convert |
Example: upperCase('identifier: ' + PROJECT.identifier)useDate(tm) → Date
Convert date to epoch in milliseconds
| Arguments | Class | Description |
|---|---|---|
| tm | Long | Epoch value in milliseconds |
Example: useDate(PROJECT.customDeadline)useTime(dtm) → Long
Convert date to epoch in milliseconds
| Arguments | Class | Description |
|---|---|---|
| str | Date | Date value |
Example: useTime('2026-07-29 00:00:00')userEpoch() → Long
Epoch in milliseconds of the current user
Example: userEpoch()userUuId() → UUID
Unique identifer of the current user
Example: userUiId()workingHours(opt) → Float
Configuration for working hours
| Arguments | Class | Description |
|---|---|---|
| opt | String | Option specifying type of the settings |
| 'day' | Number of working hours per day (e.g. 8.5) | |
| 'month' | Number of working hours per month (e.g. 183.6) | |
| 'week' | Number of working hours per week (e.g. 42.5) | |
| 'year' | Number of working hours per year (e.g. 2210.0) |
Example: workingHours('day')workingTime(opt) → Long
Configuration of the office working time
| Arguments | Class | Description |
|---|---|---|
| opt | String | Option specifying type of the calculations |
| 'daily' | Number of milliseconds of office working time per day (e.g. 8 hours) | |
| 'hourly' | Number of milliseconds of office working time per hour (e.g.60 minutes) | |
| 'monthly' | Number of milliseconds of office working time per month (e.g. 21 days) | |
| 'quarterly' | Number of milliseconds of office working time per quarter (e.g. 260/4 days) | |
| 'weekly' | Number of milliseconds of office working time per week (e.g. 5 days) | |
| 'yearly' | Number of milliseconds of office working time per year (e.g. 260 days) |
Example: workingTime('weekly')Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article