Class: ExpressionActionContext
Hierarchy
ExpressionGlobalContext↳
ExpressionActionContext
Constructors
constructor
• new ExpressionActionContext(baseProps)
Parameters
| Name | Type |
|---|---|
baseProps | ExpressionActionContextProps |
Overrides
ExpressionGlobalContext.constructor
Accessors
assignee
• get assignee(): null | ExpressionUser
Returns
null | ExpressionUser
closed
• get closed(): Promise<null | Date>
Returns
Promise<null | Date>
created
• get created(): Promise<Date>
Returns
Promise<Date>
description
• get description(): Promise<string>
Returns
Promise<string>
due
• get due(): Promise<null | Date>
Returns
Promise<null | Date>
fields
• get fields(): Promise<ExpressionActionFields>
Returns
Promise<ExpressionActionFields>
key
• get key(): Promise<string>
Returns
Promise<string>
name
• get name(): Promise<string>
Returns
Promise<string>
site
• get site(): ExpressionSite
Returns
ExpressionSite
transitioned
• get transitioned(): Promise<Date>
Returns
Promise<Date>
updated
• get updated(): Promise<Date>
Returns
Promise<Date>
user
• get user(): ExpressionUser
Returns
ExpressionUser
Aggregate Functions Methods
ALL
▸ ALL(criteria, ...values): boolean
Parameters
| Name | Type |
|---|---|
criteria | any |
...values | any[] |
Returns
boolean
Inherited from
ExpressionGlobalContext.ALL
ANY
▸ ANY(criteria, ...values): boolean
Parameters
| Name | Type |
|---|---|
criteria | any |
...values | any[] |
Returns
boolean
Inherited from
ExpressionGlobalContext.ANY
AVERAGE
▸ AVERAGE(...values): number
Parameters
| Name | Type |
|---|---|
...values | (null | NumberLike)[] |
Returns
number
Inherited from
ExpressionGlobalContext.AVERAGE
COALESCE
▸ COALESCE(...values): boolean
Returns the first non null value from the supplied values
Parameters
| Name | Type |
|---|---|
...values | any[] |
Returns
boolean
Inherited from
ExpressionGlobalContext.COALESCE
COUNT
▸ COUNT(...values): number
Parameters
| Name | Type |
|---|---|
...values | any[] |
Returns
number
Inherited from
ExpressionGlobalContext.COUNT
COUNTIF
▸ COUNTIF(criteria, ...values): number
Parameters
| Name | Type |
|---|---|
criteria | any |
...values | any[] |
Returns
number
Inherited from
ExpressionGlobalContext.COUNTIF
DEFAULT
▸ DEFAULT(value, defaultValue): boolean
Returns the defaultValue if the value is null
Parameters
| Name | Type |
|---|---|
value | any |
defaultValue | any |
Returns
boolean
Inherited from
ExpressionGlobalContext.DEFAULT
MAX
▸ MAX(...values): number
Parameters
| Name | Type |
|---|---|
...values | (null | NumberLike)[] |
Returns
number
Inherited from
ExpressionGlobalContext.MAX
MIN
▸ MIN(...values): number
Parameters
| Name | Type |
|---|---|
...values | (null | NumberLike)[] |
Returns
number
Inherited from
ExpressionGlobalContext.MIN
SUM
▸ SUM(...values): number
Returns the sum of the passed numbers
Parameters
| Name | Type |
|---|---|
...values | (null | NumberLike)[] |
Returns
number
Inherited from
ExpressionGlobalContext.SUM
Array Functions Methods
AT
▸ AT(index, ...values): number
Returns the item at the specified index in the array (zero based)
Parameters
| Name | Type |
|---|---|
index | number |
...values | any[] |
Returns
number
Inherited from
ExpressionGlobalContext.AT
FIRST
▸ FIRST(...values): number
Returns the first item in an array of values
Parameters
| Name | Type |
|---|---|
...values | any[] |
Returns
number
Inherited from
ExpressionGlobalContext.FIRST
LAST
▸ LAST(...values): number
Returns the last item in an array of values
Parameters
| Name | Type |
|---|---|
...values | any[] |
Returns
number
Inherited from
ExpressionGlobalContext.LAST
Date Functions Methods
ADDDAYS
▸ ADDDAYS(date, amount): null | Date
Adds the specified number of days to the given date.
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
amount | null | number |
Returns
null | Date
Inherited from
ExpressionGlobalContext.ADDDAYS
ADDHOURS
▸ ADDHOURS(date, amount): null | Date
Adds the specified number of hours to the given date.
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
amount | null | number |
Returns
null | Date
Inherited from
ExpressionGlobalContext.ADDHOURS
ADDMINUTES
▸ ADDMINUTES(date, amount): null | Date
Adds the specified number of minutes to the given date.
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
amount | null | number |
Returns
null | Date
Inherited from
ExpressionGlobalContext.ADDMINUTES
ADDMONTHS
▸ ADDMONTHS(date, amount): null | Date
Adds the specified number of months to the given date.
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
amount | null | number |
Returns
null | Date
Inherited from
ExpressionGlobalContext.ADDMONTHS
ADDSECONDS
▸ ADDSECONDS(date, amount): null | Date
Adds the specified number of seconds to the given date.
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
amount | null | number |
Returns
null | Date
Inherited from
ExpressionGlobalContext.ADDSECONDS
ADDWEEKS
▸ ADDWEEKS(date, amount): null | Date
Adds the specified number of weeks to the given date.
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
amount | null | number |
Returns
null | Date
Inherited from
ExpressionGlobalContext.ADDWEEKS
ADDYEARS
▸ ADDYEARS(date, amount): null | Date
Adds the specified number of years to the given date.
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
amount | null | number |
Returns
null | Date
Inherited from
ExpressionGlobalContext.ADDYEARS
DIFFDAYS
▸ DIFFDAYS(endDate, startDate): null | number
Subtracts the second date from the first date and returns the number of days difference e.g. DIFFDAYS('2023-01-05', '2023-01-01') = 4
Parameters
| Name | Type |
|---|---|
endDate | null | DateLike |
startDate | null | DateLike |
Returns
null | number
Inherited from
ExpressionGlobalContext.DIFFDAYS
DIFFHOURS
▸ DIFFHOURS(endDate, startDate): null | number
Subtracts the second date from the first date and returns the number of hours difference e.g. DIFFHOURS('2023-01-01 05:01:01', '2023-01-01 00:00:00') = 5
Parameters
| Name | Type |
|---|---|
endDate | null | DateLike |
startDate | null | DateLike |
Returns
null | number
Inherited from
ExpressionGlobalContext.DIFFHOURS
DIFFMINUTES
▸ DIFFMINUTES(endDate, startDate): null | number
Subtracts the second date from the first date and returns the number of minutes difference e.g. DIFFMINUTES('2023-01-01 00:01:02', '2023-01-01 00:00:00') = 1
Parameters
| Name | Type |
|---|---|
endDate | null | DateLike |
startDate | null | DateLike |
Returns
null | number
Inherited from
ExpressionGlobalContext.DIFFMINUTES
DIFFMONTHS
▸ DIFFMONTHS(endDate, startDate): null | number
Subtracts the second date from the first date and returns the number of months difference e.g. DIFFMONTHS('2023-03-05', '2023-01-01') = 2
Parameters
| Name | Type |
|---|---|
endDate | null | DateLike |
startDate | null | DateLike |
Returns
null | number
Inherited from
ExpressionGlobalContext.DIFFMONTHS
DIFFSECONDS
▸ DIFFSECONDS(endDate, startDate): null | number
Subtracts the second date from the first date and returns the number of seconds difference e.g. DIFFSECONDS('2023-01-01 00:01:02', '2023-01-01 00:00:00') = 62
Parameters
| Name | Type |
|---|---|
endDate | null | DateLike |
startDate | null | DateLike |
Returns
null | number
Inherited from
ExpressionGlobalContext.DIFFSECONDS
DIFFTIME
▸ DIFFTIME(endDate, startDate): null | string
Subtracts the second date from the first date and returns the time diff in the format [days].HH.MM:SS
Parameters
| Name | Type |
|---|---|
endDate | null | DateLike |
startDate | null | DateLike |
Returns
null | string
Inherited from
ExpressionGlobalContext.DIFFTIME
DIFFWEEKS
▸ DIFFWEEKS(endDate, startDate): null | number
Subtracts the second date from the first date and returns the number of weeks difference e.g. DIFFWEEKS('2023-01-01', '2023-01-17') = 2
Parameters
| Name | Type |
|---|---|
endDate | null | DateLike |
startDate | null | DateLike |
Returns
null | number
Inherited from
ExpressionGlobalContext.DIFFWEEKS
DIFFYEARS
▸ DIFFYEARS(endDate, startDate): null | number
Subtracts the second date from the first date and returns the number of years difference e.g. DIFFYEARS('2025-01-05', '2023-01-01') = 2
Parameters
| Name | Type |
|---|---|
endDate | null | DateLike |
startDate | null | DateLike |
Returns
null | number
Inherited from
ExpressionGlobalContext.DIFFYEARS
ENDOFDAY
▸ ENDOFDAY(date): null | Date
Returns the end of the day for a given date and time
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
Returns
null | Date
Inherited from
ExpressionGlobalContext.ENDOFDAY
ISAFTER
▸ ISAFTER(date, dateToCompare): boolean
Returns true if the first date is after the second one
Parameters
| Name | Type |
|---|---|
date | DateLike |
dateToCompare | DateLike |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISAFTER
ISBEFORE
▸ ISBEFORE(date, dateToCompare): boolean
Returns true if the first date is before the second one
Parameters
| Name | Type |
|---|---|
date | DateLike |
dateToCompare | DateLike |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISBEFORE
ISFUTURE
▸ ISFUTURE(date): boolean
Returns true if the date is in the future
Parameters
| Name | Type |
|---|---|
date | DateLike |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISFUTURE
ISPAST
▸ ISPAST(date): boolean
Returns true if the date is in the past
Parameters
| Name | Type |
|---|---|
date | DateLike |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISPAST
MAXDATE
▸ MAXDATE(...values): Date
Returns the latest of the given dates.
Parameters
| Name | Type |
|---|---|
...values | (null | DateLike)[] |
Returns
Date
Inherited from
ExpressionGlobalContext.MAXDATE
MINDATE
▸ MINDATE(...values): Date
Returns the earliest of the given dates.
Parameters
| Name | Type |
|---|---|
...values | (null | DateLike)[] |
Returns
Date
Inherited from
ExpressionGlobalContext.MINDATE
NOW
▸ NOW(): Date
Returns the current date and time
Returns
Date
Inherited from
ExpressionGlobalContext.NOW
PARSEDATE
▸ PARSEDATE(date): null | Date
Converts a value into a date object
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
Returns
null | Date
Inherited from
ExpressionGlobalContext.PARSEDATE
STARTOFDAY
▸ STARTOFDAY(date): null | Date
Returns the start of the day for a given date and time
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
Returns
null | Date
Inherited from
ExpressionGlobalContext.STARTOFDAY
TODAY
▸ TODAY(): Date
Returns the start of the current day
Returns
Date
Inherited from
ExpressionGlobalContext.TODAY
Logical Functions Methods
IF
▸ IF(logicalTest, valueIfTrue, valueIfFalse): any
Parameters
| Name | Type |
|---|---|
logicalTest | any |
valueIfTrue | any |
valueIfFalse | any |
Returns
any
Inherited from
ExpressionGlobalContext.IF
SWITCH
▸ SWITCH(valueToSwitch, valuesToMatchAndReturn, defaultValue?): any
Parameters
| Name | Type |
|---|---|
valueToSwitch | any |
valuesToMatchAndReturn | [any, any][] |
defaultValue? | any |
Returns
any
Inherited from
ExpressionGlobalContext.SWITCH
Math Functions Methods
ABS
▸ ABS(number): null | number
Returns the absolute value of a number. The absolute value of a number is the number without its sign.
Parameters
| Name | Type |
|---|---|
number | null | NumberLike |
Returns
null | number
Inherited from
ExpressionGlobalContext.ABS
CEILING
▸ CEILING(number): null | number
Rounds a number up to a whole number
Parameters
| Name | Type |
|---|---|
number | null | NumberLike |
Returns
null | number
Inherited from
ExpressionGlobalContext.CEILING
FLOOR
▸ FLOOR(number): null | number
Rounds a number down to a whole number
Parameters
| Name | Type |
|---|---|
number | null | NumberLike |
Returns
null | number
Inherited from
ExpressionGlobalContext.FLOOR
ISNUMERIC
▸ ISNUMERIC(number): boolean
Returns true if the value is a valid number
Parameters
| Name | Type |
|---|---|
number | any |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISNUMERIC
ROUND
▸ ROUND(number, numberOfDigits?): null | number
Rounds a value to the nearest whole number or number of decimal places if specified
Parameters
| Name | Type |
|---|---|
number | null | NumberLike |
numberOfDigits? | number |
Returns
null | number
Inherited from
ExpressionGlobalContext.ROUND
Text Functions Methods
FORMAT
▸ FORMAT(value, format): string
Parameters
| Name | Type |
|---|---|
value | string | number | Date |
format | string |
Returns
string
Inherited from
ExpressionGlobalContext.FORMAT
ISEMAIL
▸ ISEMAIL(value): boolean
Returns true is the value is a valid email address
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISEMAIL
ISEMPTY
▸ ISEMPTY(value): boolean
Returns true is the value is empty/blank
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISEMPTY
ISFALSE
▸ ISFALSE(value): boolean
Returns true is the value is false
Parameters
| Name | Type |
|---|---|
value | BooleanLike |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISFALSE
ISNEGATIVE
▸ ISNEGATIVE(value): boolean
Returns true is the value is less than 0
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISNEGATIVE
ISPOSITIVE
▸ ISPOSITIVE(value): boolean
Returns true is the value is greater than 0
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISPOSITIVE
ISTRUE
▸ ISTRUE(value): boolean
Returns true is the value is true
Parameters
| Name | Type |
|---|---|
value | BooleanLike |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISTRUE
ISZERO
▸ ISZERO(value): boolean
Returns true is the value is 0
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionGlobalContext.ISZERO
LEFT
▸ LEFT(text, numberOfchars): string
Parameters
| Name | Type |
|---|---|
text | string |
numberOfchars | number |
Returns
string
Inherited from
ExpressionGlobalContext.LEFT
LEN
▸ LEN(text): number
Parameters
| Name | Type |
|---|---|
text | string |
Returns
number
Inherited from
ExpressionGlobalContext.LEN
LIKE
▸ LIKE(value, like, caseSensitive?): boolean
Compare the value string to the like string and returns true if it is a match Case insensitve by default Wildcards: ? = Single character, # = Single number character, * = Zero or more characters,
Parameters
| Name | Type | Default value |
|---|---|---|
value | string | undefined |
like | string | undefined |
caseSensitive | boolean | false |
Returns
boolean
Inherited from
ExpressionGlobalContext.LIKE
LOWER
▸ LOWER(text): string
Parameters
| Name | Type |
|---|---|
text | string |
Returns
string
Inherited from
ExpressionGlobalContext.LOWER
MATCH
▸ MATCH(value, pattern): boolean
Parameters
| Name | Type |
|---|---|
value | string |
pattern | string |
Returns
boolean
Inherited from
ExpressionGlobalContext.MATCH
MID
▸ MID(text, startFrom, numberOfchars): string
Parameters
| Name | Type |
|---|---|
text | string |
startFrom | number |
numberOfchars | number |
Returns
string
Inherited from
ExpressionGlobalContext.MID
NOTEMPTY
▸ NOTEMPTY(value): boolean
Returns true is the value is not empty/blank
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionGlobalContext.NOTEMPTY
NUMBERVALUE
▸ NUMBERVALUE(text): null | number
Parameters
| Name | Type |
|---|---|
text | string |
Returns
null | number
Inherited from
ExpressionGlobalContext.NUMBERVALUE
REPLACE
▸ REPLACE(text, start, length, newText): string
Parameters
| Name | Type |
|---|---|
text | string |
start | any |
length | any |
newText | any |
Returns
string
Inherited from
ExpressionGlobalContext.REPLACE
RIGHT
▸ RIGHT(text, numberOfchars): string
Parameters
| Name | Type |
|---|---|
text | string |
numberOfchars | number |
Returns
string
Inherited from
ExpressionGlobalContext.RIGHT
SUBSTITUTE
▸ SUBSTITUTE(text, oldText, newText): string
Parameters
| Name | Type |
|---|---|
text | string |
oldText | string |
newText | string |
Returns
string
Inherited from
ExpressionGlobalContext.SUBSTITUTE
UPPER
▸ UPPER(text): string
Parameters
| Name | Type |
|---|---|
text | string |
Returns
string
Inherited from
ExpressionGlobalContext.UPPER