Class: ExpressionLoopContext
The base context for expressions executed within loops such as for an email event within a loop
Hierarchy
ExpressionExecutionBaseContext↳
ExpressionLoopContext
Properties
timeZone
• Readonly timeZone: undefined | null | string
Inherited from
ExpressionExecutionBaseContext.timeZone
Accessors
documents
• get documents(): ExpressionDocuments
Returns
ExpressionDocuments
Overrides
ExpressionExecutionBaseContext.documents
execution
• get execution(): ExpressionExecution
Returns
Overrides
ExpressionExecutionBaseContext.execution
files
• get files(): Promise<ExpressionFiles>
Returns
Promise<ExpressionFiles>
Overrides
ExpressionExecutionBaseContext.files
loopIteration
• get loopIteration(): ExpressionLoop
Returns
media
• get media(): ExpressionMedia
Returns
ExpressionMedia
Overrides
ExpressionExecutionBaseContext.media
outcomes
• get outcomes(): Promise<ExpressionOutcomeTypes>
Returns
Promise<ExpressionOutcomeTypes>
pages
• get pages(): Promise<ExpressionPages>
Returns
Promise<ExpressionPages>
questions
• get questions(): Promise<ExpressionQuestions>
Returns
Promise<ExpressionQuestions>
site
• get site(): ExpressionSite
Returns
Overrides
ExpressionExecutionBaseContext.site
subProcedures
• get subProcedures(): Promise<ExpressionSubProcedures>
Returns
Promise<ExpressionSubProcedures>
user
• get user(): ExpressionUser
Returns
Overrides
ExpressionExecutionBaseContext.user
Aggregate Functions Methods
ALL
▸ ALL(criteria, ...values): boolean
Parameters
| Name | Type |
|---|---|
criteria | any |
...values | any[] |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ALL
ANY
▸ ANY(criteria, ...values): boolean
Parameters
| Name | Type |
|---|---|
criteria | any |
...values | any[] |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ANY
AVERAGE
▸ AVERAGE(...values): number
Parameters
| Name | Type |
|---|---|
...values | (null | NumberLike)[] |
Returns
number
Inherited from
ExpressionExecutionBaseContext.AVERAGE
COALESCE
▸ COALESCE(...values): boolean
Returns the first non null value from the supplied values
Parameters
| Name | Type |
|---|---|
...values | any[] |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.COALESCE
COUNT
▸ COUNT(...values): number
Parameters
| Name | Type |
|---|---|
...values | any[] |
Returns
number
Inherited from
ExpressionExecutionBaseContext.COUNT
COUNTIF
▸ COUNTIF(criteria, ...values): number
Parameters
| Name | Type |
|---|---|
criteria | any |
...values | any[] |
Returns
number
Inherited from
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.DEFAULT
DIVIDE
▸ DIVIDE(value, ...values): null | number
Returns the first number divided by the following numbers
Parameters
| Name | Type |
|---|---|
value | null | NumberLike |
...values | (null | NumberLike)[] |
Returns
null | number
Inherited from
ExpressionExecutionBaseContext.DIVIDE
MAX
▸ MAX(...values): number
Parameters
| Name | Type |
|---|---|
...values | (null | NumberLike)[] |
Returns
number
Inherited from
ExpressionExecutionBaseContext.MAX
MIN
▸ MIN(...values): number
Parameters
| Name | Type |
|---|---|
...values | (null | NumberLike)[] |
Returns
number
Inherited from
ExpressionExecutionBaseContext.MIN
MULTIPLY
▸ MULTIPLY(value, ...values): null | number
Returns the multiplication of the passed numbers
Parameters
| Name | Type |
|---|---|
value | null | NumberLike |
...values | (null | NumberLike)[] |
Returns
null | number
Inherited from
ExpressionExecutionBaseContext.MULTIPLY
SUBTRACT
▸ SUBTRACT(...values): number
Returns the first number minus by the following numbers
Parameters
| Name | Type |
|---|---|
...values | (null | NumberLike)[] |
Returns
number
Inherited from
ExpressionExecutionBaseContext.SUBTRACT
SUM
▸ SUM(...values): number
Returns the sum of the passed numbers
Parameters
| Name | Type |
|---|---|
...values | (null | NumberLike)[] |
Returns
number
Inherited from
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.AT
CELLLOOKUP
▸ CELLLOOKUP(rows, lookupCol, lookupValue, outputCol): any
Returns the value of the outputCol for the first row where the lookupCol has the lookupValue
Parameters
| Name | Type |
|---|---|
rows | any[] |
lookupCol | string |
lookupValue | string |
outputCol | string |
Returns
any
Inherited from
ExpressionExecutionBaseContext.CELLLOOKUP
FIRST
▸ FIRST(...values): number
Returns the first item in an array of values
Parameters
| Name | Type |
|---|---|
...values | any[] |
Returns
number
Inherited from
ExpressionExecutionBaseContext.FIRST
LAST
▸ LAST(...values): number
Returns the last item in an array of values
Parameters
| Name | Type |
|---|---|
...values | any[] |
Returns
number
Inherited from
ExpressionExecutionBaseContext.LAST
LOOKUP
▸ LOOKUP(key, criteria, ...values): any
Returns the first object which matches the lookup from an array objects
Parameters
| Name | Type |
|---|---|
key | string |
criteria | string |
...values | any[] |
Returns
any
Inherited from
ExpressionExecutionBaseContext.LOOKUP
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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.ISBEFORE
ISFUTURE
▸ ISFUTURE(date): boolean
Returns true if the date is in the future
Parameters
| Name | Type |
|---|---|
date | DateLike |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ISFUTURE
ISPAST
▸ ISPAST(date): boolean
Returns true if the date is in the past
Parameters
| Name | Type |
|---|---|
date | DateLike |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ISPAST
MAXDATE
▸ MAXDATE(...values): Date
Returns the latest of the given dates.
Parameters
| Name | Type |
|---|---|
...values | (null | DateLike)[] |
Returns
Date
Inherited from
ExpressionExecutionBaseContext.MAXDATE
MINDATE
▸ MINDATE(...values): Date
Returns the earliest of the given dates.
Parameters
| Name | Type |
|---|---|
...values | (null | DateLike)[] |
Returns
Date
Inherited from
ExpressionExecutionBaseContext.MINDATE
NOW
▸ NOW(): Date
Returns the current date and time
Returns
Date
Inherited from
ExpressionExecutionBaseContext.NOW
PARSEDATE
▸ PARSEDATE(date): null | Date
Converts a value into a date object
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
Returns
null | Date
Inherited from
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.STARTOFDAY
TODAY
▸ TODAY(): Date
Returns the start of the current day
Returns
Date
Inherited from
ExpressionExecutionBaseContext.TODAY
Logical Functions Methods
IF
▸ IF(logicalTest, valueIfTrue, valueIfFalse): any
Parameters
| Name | Type |
|---|---|
logicalTest | any |
valueIfTrue | any |
valueIfFalse | any |
Returns
any
Inherited from
ExpressionExecutionBaseContext.IF
SWITCH
▸ SWITCH(valueToSwitch, valuesToMatchAndReturn, defaultValue?): any
Parameters
| Name | Type |
|---|---|
valueToSwitch | any |
valuesToMatchAndReturn | [any, any][] |
defaultValue? | any |
Returns
any
Inherited from
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.FLOOR
ISNUMERIC
▸ ISNUMERIC(number): boolean
Returns true if the value is a valid number
Parameters
| Name | Type |
|---|---|
number | any |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.ROUND
Other Methods
DAY
▸ DAY(date): null | number
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
Returns
null | number
Inherited from
ExpressionExecutionBaseContext.DAY
ISDATE
▸ ISDATE(value): boolean
Parameters
| Name | Type |
|---|---|
value | any |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ISDATE
JOIN
▸ JOIN(seperator, ...values): boolean
Parameters
| Name | Type |
|---|---|
seperator | string |
...values | any[] |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.JOIN
JULIANDAY
▸ JULIANDAY(date): null | number
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
Returns
null | number
Inherited from
ExpressionExecutionBaseContext.JULIANDAY
MONTH
▸ MONTH(date): null | number
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
Returns
null | number
Inherited from
ExpressionExecutionBaseContext.MONTH
YEAR
▸ YEAR(date): null | number
Parameters
| Name | Type |
|---|---|
date | null | DateLike |
Returns
null | number
Inherited from
ExpressionExecutionBaseContext.YEAR
Text Functions Methods
FORMAT
▸ FORMAT(value, format): string
Parameters
| Name | Type |
|---|---|
value | string | number | Date |
format | string |
Returns
string
Inherited from
ExpressionExecutionBaseContext.FORMAT
ISEMAIL
▸ ISEMAIL(value): boolean
Returns true is the value is a valid email address
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ISEMAIL
ISEMPTY
▸ ISEMPTY(value): boolean
Returns true is the value is empty/blank
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ISEMPTY
ISFALSE
▸ ISFALSE(value): boolean
Returns true is the value is false
Parameters
| Name | Type |
|---|---|
value | BooleanLike |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ISFALSE
ISNEGATIVE
▸ ISNEGATIVE(value): boolean
Returns true is the value is less than 0
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ISNEGATIVE
ISPOSITIVE
▸ ISPOSITIVE(value): boolean
Returns true is the value is greater than 0
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ISPOSITIVE
ISTRUE
▸ ISTRUE(value): boolean
Returns true is the value is true
Parameters
| Name | Type |
|---|---|
value | BooleanLike |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ISTRUE
ISZERO
▸ ISZERO(value): boolean
Returns true is the value is 0
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.ISZERO
LEFT
▸ LEFT(text, numberOfchars): string
Returns specified number of charachters the left hand side of a text string
Parameters
| Name | Type |
|---|---|
text | string |
numberOfchars | number |
Returns
string
Inherited from
ExpressionExecutionBaseContext.LEFT
LEN
▸ LEN(text): number
Retruns the length of a text string
Parameters
| Name | Type |
|---|---|
text | string |
Returns
number
Inherited from
ExpressionExecutionBaseContext.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
ExpressionExecutionBaseContext.LIKE
LOWER
▸ LOWER(text): string
Parameters
| Name | Type |
|---|---|
text | string |
Returns
string
Inherited from
ExpressionExecutionBaseContext.LOWER
MATCH
▸ MATCH(value, pattern): boolean
Parameters
| Name | Type |
|---|---|
value | string |
pattern | string |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.MATCH
MID
▸ MID(text, startFrom, numberOfchars): string
Parameters
| Name | Type |
|---|---|
text | string |
startFrom | number |
numberOfchars | number |
Returns
string
Inherited from
ExpressionExecutionBaseContext.MID
NEWID
▸ NEWID(): string
Retruns a globally unique identifier
Returns
string
Inherited from
ExpressionExecutionBaseContext.NEWID
NOTEMPTY
▸ NOTEMPTY(value): boolean
Returns true is the value is not empty/blank
Parameters
| Name | Type |
|---|---|
value | string |
Returns
boolean
Inherited from
ExpressionExecutionBaseContext.NOTEMPTY
NUMBERVALUE
▸ NUMBERVALUE(text): null | number
Parameters
| Name | Type |
|---|---|
text | string |
Returns
null | number
Inherited from
ExpressionExecutionBaseContext.NUMBERVALUE
PADEND
▸ PADEND(value, length, filler): string
Parameters
| Name | Type |
|---|---|
value | string |
length | number |
filler | string |
Returns
string
Inherited from
ExpressionExecutionBaseContext.PADEND
PADSTART
▸ PADSTART(value, length, filler): string
Parameters
| Name | Type |
|---|---|
value | string |
length | number |
filler | string |
Returns
string
Inherited from
ExpressionExecutionBaseContext.PADSTART
REPLACE
▸ REPLACE(text, start, length, newText): string
Parameters
| Name | Type |
|---|---|
text | string |
start | any |
length | any |
newText | any |
Returns
string
Inherited from
ExpressionExecutionBaseContext.REPLACE
RIGHT
▸ RIGHT(text, numberOfchars): string
Retruns specified number of charachters the right hand side of a text string
Parameters
| Name | Type |
|---|---|
text | string |
numberOfchars | number |
Returns
string
Inherited from
ExpressionExecutionBaseContext.RIGHT
SUBSTITUTE
▸ SUBSTITUTE(text, oldText, newText): string
Parameters
| Name | Type |
|---|---|
text | string |
oldText | string |
newText | string |
Returns
string
Inherited from
ExpressionExecutionBaseContext.SUBSTITUTE
UPPER
▸ UPPER(text): string
Parameters
| Name | Type |
|---|---|
text | string |
Returns
string
Inherited from
ExpressionExecutionBaseContext.UPPER