Formula Functions

Modified on Sun, 16 Aug at 12:46 PM

These are the functions that can be used within formulas.


abs(num) → Double

Returns absolute value of the argument


ArgumentsClassDescription
numDoubleDecimal number


Example: abs(TASK.fixedCost - TASK.estimatedCost)


acos(num) → Double

Returns value of the mathematical function acos


ArgumentsClassDescription
numDoubleDecimal 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


ArgumentsClassDescription
fldObjectDatabase datapoint, e.g. STAFF.TASK.estimatedDuration
filterObjectDatapoint filtering criteria specification or none
optStringOption 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


ArgumentsClassDescription
bool1BooleanLogical 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


ArgumentsClassDescription
strStringString representation of timestamp
optStringOption 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


ArgumentsClassDescription
numDoubleDecimal number


Example: asin(PROJECT.estimatedCost / 2500.00)


atan(num) → Double

Returns value of the mathematical function atan


ArgumentsClassDescription
numDoubleDecimal number


Example: atan(ACTIVITY.fixedDuration - ACTIVITY.actualDuration)


asTime(str,opt) → Long

Convert formatted string to epoch in milliseconds


ArgumentsClassDescription
strStringString representation of timestamp
optStringOption 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


ArgumentsClassDescription
txtStringString to convert


Example: capitalize(CUSTOMER.name)



cbrt(num) → Double

Returns the cube root of the argument


ArgumentsClassDescription
numDoubleDecimal number


Example: cbrt(TASK.estimatedCost / TASK.REBATE.rebate)


ceil(num) → Double

Returns the smallest mathematical integer that is greater than or equal to argument

ArgumentsClassDescription
numDoubleDecimal number


Example: ceil(TASK.fixedDuration * 1.5)


concat(obj1,obj2, ... ) → String

Concatenation of the string arguments


ArgumentsClassDescription
obj1StringFirst argument to concatenate
obj2ObjectSecond 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


ArgumentsClassDescription
baseStringBase currency identifier as ISO-4217 standard
numDoubleAmount of base currency to convert
quoteStringLocal currency identifier as ISO-4217 standard


Example: convertCurrency('EUR', TASK.estimatedCost, 'USD')


convertDate(dt,opt) → Long

Convert date to specific value


ArgumentsClassDescription
dtDateDate to convert
optStringOption 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


ArgumentsClassDescription
tmsLongNumber of milliseconds to convert
optStringOption 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


ArgumentsClassDescription
cntLongNumber of bytes to convert
optStringOption 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


ArgumentsClassDescription
numDoubleDecimal number


Example: cos(TASK.actualDuration / 35.20)



cosh(num) → Double

Returns value of the mathematical function cosh


ArgumentsClassDescription
numDoubleDecimal 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


ArgumentsClassDescription
fldObjectDatabase datapoint, e.g. STAFF.TASK.estimatedDuration
filterBooleanDatapoint 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


ArgumentsClassDescription
dtDateDate used for counting
optStringOption 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


ArgumentsClassDescription
dtLongTime in milliseconds
optStringOption 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


ArgumentsClassDescription
filterBooleanDatapoint 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


ArgumentsClassDescription
fldObjectDatabase datapoint, e.g. STAFF.name
constObjectDefault 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


ArgumentsClassDescription
filterBooleanDatapoint 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


ArgumentsClassDescription
num1StringDividend, number being divided
num2ObjectDivisor, number that divides dividend
constObjectDefault value as constant


Example: divide(STAFF.payAmount, 365, 0)


enumName(fld) → String

Use enumeration key


ArgumentsClassDescription
fldObjectDatabase 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


ArgumentsClassDescription
fldObjectDatabase datapoint, e.g. STAFF.TASK.estimatedDuration
filterBooleanDatapoint 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


ArgumentsClassDescription
numDoubleDecimal number


Example: exp(REBATE.rebate / 55.0)



floor(num) → Double

Returns the largest mathematical integer that is less than or equal to argument


ArgumentsClassDescription
numDoubleDecimal number


Example: floor(PROJECT.estimatedCost)



formatDate(dt,fmt) → String

Format number to a string


ArgumentsClassDescription
dtDateDate to format
fmtStringFormat 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


ArgumentsClassDescription
tmsLongNumber of milliseconds to format
optStringOption 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


ArgumentsClassDescription
cntLongNumber of bytes to convert
optStringOption 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


ArgumentsClassDescription
numLongNumber to format
fmtStringFormat 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


ArgumentsClassDescription
tmsLongNumber of milliseconds to format
fmtStringFormat specification as ISO-8601 standard


Example: formatTime(BOOKING.beginDate, 'hh:mm:ss')



getDate(opt) → Date

Date system values


ArgumentsClassDescription
optStringOption 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


ArgumentsClassDescription
optStringOption specifying type of the value
'max'Get minimum value
'min'Get maximum value


Example: getLong('max')



getReal(opt) → Long

Get system float number


ArgumentsClassDescription
optStringOption specifying type of the value
'max'Get minimum value
'min'Get maximum value


Example: getReal('min')



getTime(opt) → Long

Date system values


ArgumentsClassDescription
optStringOption 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


ArgumentsClassDescription
askBooleanLogical condition
val1ObjectValue returned if the condition is true
val2ObjectValue 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


ArgumentsClassDescription
numObjectObject to test for null
constObjectDefault value as constant


Example: ifNull(BOOKING.fixedCost, 0.0)



ifZero(num,val) → Object

Use alternative value if the argument is zero or null


ArgumentsClassDescription
numObjectNumber to test for zero, null or empty string
constObjectDefault value as constant


Example: ifZero(STAFF.payAmount, "Staff has no salary")



isNumber(obj) → Boolean

Check if the object is a number


ArgumentsClassDescription
objObjectValue of unknown type


Example: isNumber(SKILL.customFieldABC)



length(str) → Integer

Get length of the string


ArgumentsClassDescription
strStringString of characters


Example: length(PROJECT.description)



log(num) → Double

Returns result of computing the natural logarithm of the argument


ArgumentsClassDescription
numDoubleDecimal number


Example: log(PROJECT.estimatedCost / PROJECT.REBATE.rebate)



log10(num) → Double

Returns result of computing the base 10 logarithm of the argument


ArgumentsClassDescription
numDoubleDecimal number


Example: log10(TASK.actualDuration - TASK.customOverheadOffset)



lookup(fld,filter) → Object

Search data collection for a first value that matches the filter conditions


ArgumentsClassDescription
fldObjectDatabase datapoint, e.g. STAFF.TASK.estimatedDuration
filterBooleanDatapoint 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


ArgumentsClassDescription
txtStringString to convert


Example: lowerCase(STAFF.name)



max(fld,filter) → Double

Aggregate records in database by maximum value with the option to filter the records


ArgumentsClassDescription
fldDoubleDatabase datapoint, e.g. STAFF.TASK.estimatedDuration
filterBooleanDatapoint 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


ArgumentsClassDescription
num1DoubleFirst number to compare
num2DoubleSecond 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


ArgumentsClassDescription
fldDoubleDatabase datapoint, e.g. STAFF.TASK.estimatedDuration
filterBooleanDatapoint 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


ArgumentsClassDescription
fldDoubleDatabase datapoint, e.g. STAFF.TASK.estimatedDuration
filterBooleanDatapoint filtering criteria specification or none


Example: min(PROJECT.actualCost, PROJECT.STAGE.name eq 'Completed')



minValue(num1,num2) → Double

Returns the smaller of two values


ArgumentsClassDescription
num1DoubleFirst number  to compare
num2DoubleSecond number to compare


Example: minValue(STAFF.payAmount * 12, TASK.estimatedCost)



not(bool) → Boolean

Negates provided logical argument


ArgumentsClassDescription
boolBooleanLogical value that is true or false


Example: not(STAFF.genericStaff)



officeHours(opt) → Long

Configuration of the office working hours


ArgumentsClassDescription
optStringOption 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


ArgumentsClassDescription
dtDateDate to convert
optStringOption 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


ArgumentsClassDescription
dtDateDate to convert
optStringOption 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


ArgumentsClassDescription
bool1BooleanLogical 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


ArgumentsClassDescription
numDoubleBase value
expDoubleExponent 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


ArgumentsClassDescription
txtStringString to convert


Example: reverse(STAFF.identifier)



rint(num) → Double

Returns the value that is closest to integer


ArgumentsClassDescription
numDoubleDecimal number


Example: rint(TASK.actualCost)



round(num) → Long

Rounds numeric value to the the nearest integer value


ArgumentsClassDescription
numDoubleFloating point number


Example: round(PROJECT.estimatedDuration * 1.25)



round2(num) → Double

Rounds numeric value to 2 decimal places


ArgumentsClassDescription
numIntegerFloating 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


ArgumentsClassDescription
numDoubleDecimal number


Example: signum(PROJECT.fixedCost - PROJECT.actualCost)



sin(num) → Double

Returns value of the mathematical function sin


ArgumentsClassDescription
numDoubleDecimal number


Example: sin(ACTIVITY.actualDuration / 47.50)



sinh(num) → Double

Returns value of the mathematical function sinh


ArgumentsClassDescription
numDoubleDecimal number


Example: sinh(RESOURCE.resourceQuota / 50.0)



sqrt(num) → Double

Returns value of the mathematical function sqrt


ArgumentsClassDescription
numDoubleDecimal number


Example: sqrt(COMPANY.customOverhead)



sum(fld,filter) → Double

Aggregate records in database by total value with the option to filter the records


ArgumentsClassDescription
fldDoubleDatabase datapoint, e.g. STAFF.TASK.estimatedDuration
filterBooleanDatapoint 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


ArgumentsClassDescription
aimBooleanValue, database datapoint or expression, e.g. TASK.priority
keyObjectConstant value to match for the next argument
valObjectValue returned if field is having the key
noneObjectKeyword used if none of the previously specified values is matched
nilObjectValue 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


ArgumentsClassDescription
numDoubleDecimal number


Example: tan(RESOURCE.resourceQuota / 365.0)



tanh(num) → Double

Returns value of the mathematical function tanh

ArgumentsClassDescription
numDoubleDecimal number


Example: tanh(TASK.actualDuration / TASK.fixedDuration)



textAfter(txt,chr) → String

Get letters after selected character(s)


ArgumentsClassDescription
txtStringString to extract from
chrStringCharacter(s) to select


Example: textAfter(PROJECT.identifier, 'PRJ-')



textBefore(txt,chr) → String

Get letters before selected character(s)


ArgumentsClassDescription
txtStringString to extract from
chrStringCharacter(s) to select


Example: textBefore(LOCATION.street, 'Road')



textBetween(txt,ch1,ch2) → String

Get letters between selected character(s)


ArgumentsClassDescription
txtStringString to extract from
ch1StringStarting character(s) to select
ch2StringEnding 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


ArgumentsClassDescription
txtStringText to check for sequence
strStringSequence of letters


Example: textContains(PROJECT.description, 'animation')



textHead(txt,num) → String

Drops number of letters from the tail of string


ArgumentsClassDescription
txtStringString to extract from
numIntegerNumber of characters to drop


Example: textHead(TASK.identifier, '-TASKCODE')



textIsNumber(str) → Boolean

Check if the string is representing a number


ArgumentsClassDescription
strStringA string too check


Example: textIsNumber(BOOKING.identifier)



textLeft(txt,num) → String

Get number of letters from the left side


ArgumentsClassDescription
txtStringString to extract from
numIntegerNumber of characters to extract


Example: textLeft(STAFF.identifier, 10)



textMatches(txt,rex) → Boolean

Checks whether a text contains regular expression


ArgumentsClassDescription
txtStringText to check for regular expression
rexStringRegular expression as Java standard


Example: textMatches(TASK.name, '^Layout-\\d{5}$')



textRight(txt,num) → String

Get number of letters from the right side


ArgumentsClassDescription
txtStringString to extract from
numIntegerNumber of characters to extract


Example: textRight(STAFF.identifier, 'EMPNUM-')



textTail(txt,num) → String

Drops number of letters from the head of string


ArgumentsClassDescription
txtStringString to extract from
numIntegerNumber of characters to drop


Example: textTail(RESOURCE.name, 12)



toDate(str) → Date

Convert 'yyyy-MM-dd hh:mm' formatted date and time


ArgumentsClassDescription
strStringString representing timestamp


Example: toDate('2026-12-15 09:00')


toJson(str) → JsonNode

Convert string to JSON


ArgumentsClassDescription
strStringString representation of JSON code


Example: toJson('{ "name" : "Jane Doe", "staff type" : "full time", "location" : "Canada" }')


toLong(obj) → String

Convert object to long number


ArgumentsClassDescription
objObjectObject to convert


Example: toLong(TASK.estimatedCost * 1.25)


toString(obj) → String

Convert object to a string


ArgumentsClassDescription
objObjectObject to convert


Example: toString(BOOKING.fixedCost + 1200)


toTime(str) → Long

Convert 'yyyy-MM-dd hh:mm' formatted date and time


ArgumentsClassDescription
strStringString representing timestamp


Example: toTime('2026-09-26 00:00:00')


toUuId(hex) → UUID

Convert string to UUID


ArgumentsClassDescription
hexStringString representation of UUID


Example: toUuId('2f7d3948-42fa-4d1e-8b6a-91bf71887f4c')


upperCase(txt) → String

Convert string to upper case of letters


ArgumentsClassDescription
txtStringString to convert


Example: upperCase('identifier: ' + PROJECT.identifier)


useDate(tm) → Date

Convert date to epoch in milliseconds


ArgumentsClassDescription
tmLongEpoch value in milliseconds


Example: useDate(PROJECT.customDeadline)


useTime(dtm) → Long

Convert date to epoch in milliseconds


ArgumentsClassDescription
strDateDate 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


ArgumentsClassDescription
optStringOption 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


ArgumentsClassDescription
optStringOption 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article