Skip to main content

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​

ExpressionExecution

Overrides​

ExpressionExecutionBaseContext.execution


files​

• get files(): Promise<ExpressionFiles>

Returns​

Promise<ExpressionFiles>

Overrides​

ExpressionExecutionBaseContext.files


loopIteration​

• get loopIteration(): ExpressionLoop

Returns​

ExpressionLoop


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​

ExpressionSite

Overrides​

ExpressionExecutionBaseContext.site


subProcedures​

• get subProcedures(): Promise<ExpressionSubProcedures>

Returns​

Promise<ExpressionSubProcedures>


user​

• get user(): ExpressionUser

Returns​

ExpressionUser

Overrides​

ExpressionExecutionBaseContext.user

Aggregate Functions Methods​

ALL​

▸ ALL(criteria, ...values): boolean

Parameters​

NameType
criteriaany
...valuesany[]

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ALL


ANY​

▸ ANY(criteria, ...values): boolean

Parameters​

NameType
criteriaany
...valuesany[]

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ANY


AVERAGE​

▸ AVERAGE(...values): number

Parameters​

NameType
...values(null | NumberLike)[]

Returns​

number

Inherited from​

ExpressionExecutionBaseContext.AVERAGE


COALESCE​

▸ COALESCE(...values): boolean

Returns the first non null value from the supplied values

Parameters​

NameType
...valuesany[]

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.COALESCE


COUNT​

▸ COUNT(...values): number

Parameters​

NameType
...valuesany[]

Returns​

number

Inherited from​

ExpressionExecutionBaseContext.COUNT


COUNTIF​

▸ COUNTIF(criteria, ...values): number

Parameters​

NameType
criteriaany
...valuesany[]

Returns​

number

Inherited from​

ExpressionExecutionBaseContext.COUNTIF


DEFAULT​

▸ DEFAULT(value, defaultValue): boolean

Returns the defaultValue if the value is null

Parameters​

NameType
valueany
defaultValueany

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.DEFAULT


DIVIDE​

▸ DIVIDE(value, ...values): null | number

Returns the first number divided by the following numbers

Parameters​

NameType
valuenull | NumberLike
...values(null | NumberLike)[]

Returns​

null | number

Inherited from​

ExpressionExecutionBaseContext.DIVIDE


MAX​

▸ MAX(...values): number

Parameters​

NameType
...values(null | NumberLike)[]

Returns​

number

Inherited from​

ExpressionExecutionBaseContext.MAX


MIN​

▸ MIN(...values): number

Parameters​

NameType
...values(null | NumberLike)[]

Returns​

number

Inherited from​

ExpressionExecutionBaseContext.MIN


MULTIPLY​

▸ MULTIPLY(value, ...values): null | number

Returns the multiplication of the passed numbers

Parameters​

NameType
valuenull | 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​

NameType
...values(null | NumberLike)[]

Returns​

number

Inherited from​

ExpressionExecutionBaseContext.SUBTRACT


SUM​

▸ SUM(...values): number

Returns the sum of the passed numbers

Parameters​

NameType
...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​

NameType
indexnumber
...valuesany[]

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​

NameType
rowsany[]
lookupColstring
lookupValuestring
outputColstring

Returns​

any

Inherited from​

ExpressionExecutionBaseContext.CELLLOOKUP


FIRST​

▸ FIRST(...values): number

Returns the first item in an array of values

Parameters​

NameType
...valuesany[]

Returns​

number

Inherited from​

ExpressionExecutionBaseContext.FIRST


LAST​

▸ LAST(...values): number

Returns the last item in an array of values

Parameters​

NameType
...valuesany[]

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​

NameType
keystring
criteriastring
...valuesany[]

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​

NameType
datenull | DateLike
amountnull | 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​

NameType
datenull | DateLike
amountnull | 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​

NameType
datenull | DateLike
amountnull | 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​

NameType
datenull | DateLike
amountnull | 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​

NameType
datenull | DateLike
amountnull | 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​

NameType
datenull | DateLike
amountnull | 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​

NameType
datenull | DateLike
amountnull | 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​

NameType
endDatenull | DateLike
startDatenull | 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​

NameType
endDatenull | DateLike
startDatenull | 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​

NameType
endDatenull | DateLike
startDatenull | 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​

NameType
endDatenull | DateLike
startDatenull | 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​

NameType
endDatenull | DateLike
startDatenull | 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​

NameType
endDatenull | DateLike
startDatenull | 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​

NameType
endDatenull | DateLike
startDatenull | 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​

NameType
endDatenull | DateLike
startDatenull | 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​

NameType
datenull | 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​

NameType
dateDateLike
dateToCompareDateLike

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISAFTER


ISBEFORE​

▸ ISBEFORE(date, dateToCompare): boolean

Returns true if the first date is before the second one

Parameters​

NameType
dateDateLike
dateToCompareDateLike

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISBEFORE


ISFUTURE​

▸ ISFUTURE(date): boolean

Returns true if the date is in the future

Parameters​

NameType
dateDateLike

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISFUTURE


ISPAST​

▸ ISPAST(date): boolean

Returns true if the date is in the past

Parameters​

NameType
dateDateLike

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISPAST


MAXDATE​

▸ MAXDATE(...values): Date

Returns the latest of the given dates.

Parameters​

NameType
...values(null | DateLike)[]

Returns​

Date

Inherited from​

ExpressionExecutionBaseContext.MAXDATE


MINDATE​

▸ MINDATE(...values): Date

Returns the earliest of the given dates.

Parameters​

NameType
...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​

NameType
datenull | 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​

NameType
datenull | 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​

NameType
logicalTestany
valueIfTrueany
valueIfFalseany

Returns​

any

Inherited from​

ExpressionExecutionBaseContext.IF


SWITCH​

▸ SWITCH(valueToSwitch, valuesToMatchAndReturn, defaultValue?): any

Parameters​

NameType
valueToSwitchany
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​

NameType
numbernull | NumberLike

Returns​

null | number

Inherited from​

ExpressionExecutionBaseContext.ABS


CEILING​

▸ CEILING(number): null | number

Rounds a number up to a whole number

Parameters​

NameType
numbernull | NumberLike

Returns​

null | number

Inherited from​

ExpressionExecutionBaseContext.CEILING


FLOOR​

▸ FLOOR(number): null | number

Rounds a number down to a whole number

Parameters​

NameType
numbernull | NumberLike

Returns​

null | number

Inherited from​

ExpressionExecutionBaseContext.FLOOR


ISNUMERIC​

▸ ISNUMERIC(number): boolean

Returns true if the value is a valid number

Parameters​

NameType
numberany

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​

NameType
numbernull | NumberLike
numberOfDigits?number

Returns​

null | number

Inherited from​

ExpressionExecutionBaseContext.ROUND


Other Methods​

DAY​

▸ DAY(date): null | number

Parameters​

NameType
datenull | DateLike

Returns​

null | number

Inherited from​

ExpressionExecutionBaseContext.DAY


ISDATE​

▸ ISDATE(value): boolean

Parameters​

NameType
valueany

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISDATE


JOIN​

▸ JOIN(seperator, ...values): boolean

Parameters​

NameType
seperatorstring
...valuesany[]

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.JOIN


JULIANDAY​

▸ JULIANDAY(date): null | number

Parameters​

NameType
datenull | DateLike

Returns​

null | number

Inherited from​

ExpressionExecutionBaseContext.JULIANDAY


MONTH​

▸ MONTH(date): null | number

Parameters​

NameType
datenull | DateLike

Returns​

null | number

Inherited from​

ExpressionExecutionBaseContext.MONTH


YEAR​

▸ YEAR(date): null | number

Parameters​

NameType
datenull | DateLike

Returns​

null | number

Inherited from​

ExpressionExecutionBaseContext.YEAR


Text Functions Methods​

FORMAT​

▸ FORMAT(value, format): string

Parameters​

NameType
valuestring | number | Date
formatstring

Returns​

string

Inherited from​

ExpressionExecutionBaseContext.FORMAT


ISEMAIL​

▸ ISEMAIL(value): boolean

Returns true is the value is a valid email address

Parameters​

NameType
valuestring

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISEMAIL


ISEMPTY​

▸ ISEMPTY(value): boolean

Returns true is the value is empty/blank

Parameters​

NameType
valuestring

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISEMPTY


ISFALSE​

▸ ISFALSE(value): boolean

Returns true is the value is false

Parameters​

NameType
valueBooleanLike

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISFALSE


ISNEGATIVE​

▸ ISNEGATIVE(value): boolean

Returns true is the value is less than 0

Parameters​

NameType
valuestring

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISNEGATIVE


ISPOSITIVE​

▸ ISPOSITIVE(value): boolean

Returns true is the value is greater than 0

Parameters​

NameType
valuestring

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISPOSITIVE


ISTRUE​

▸ ISTRUE(value): boolean

Returns true is the value is true

Parameters​

NameType
valueBooleanLike

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.ISTRUE


ISZERO​

▸ ISZERO(value): boolean

Returns true is the value is 0

Parameters​

NameType
valuestring

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​

NameType
textstring
numberOfcharsnumber

Returns​

string

Inherited from​

ExpressionExecutionBaseContext.LEFT


LEN​

▸ LEN(text): number

Retruns the length of a text string

Parameters​

NameType
textstring

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​

NameTypeDefault value
valuestringundefined
likestringundefined
caseSensitivebooleanfalse

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.LIKE


LOWER​

▸ LOWER(text): string

Parameters​

NameType
textstring

Returns​

string

Inherited from​

ExpressionExecutionBaseContext.LOWER


MATCH​

▸ MATCH(value, pattern): boolean

Parameters​

NameType
valuestring
patternstring

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.MATCH


MID​

▸ MID(text, startFrom, numberOfchars): string

Parameters​

NameType
textstring
startFromnumber
numberOfcharsnumber

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​

NameType
valuestring

Returns​

boolean

Inherited from​

ExpressionExecutionBaseContext.NOTEMPTY


NUMBERVALUE​

▸ NUMBERVALUE(text): null | number

Parameters​

NameType
textstring

Returns​

null | number

Inherited from​

ExpressionExecutionBaseContext.NUMBERVALUE


PADEND​

▸ PADEND(value, length, filler): string

Parameters​

NameType
valuestring
lengthnumber
fillerstring

Returns​

string

Inherited from​

ExpressionExecutionBaseContext.PADEND


PADSTART​

▸ PADSTART(value, length, filler): string

Parameters​

NameType
valuestring
lengthnumber
fillerstring

Returns​

string

Inherited from​

ExpressionExecutionBaseContext.PADSTART


REPLACE​

▸ REPLACE(text, start, length, newText): string

Parameters​

NameType
textstring
startany
lengthany
newTextany

Returns​

string

Inherited from​

ExpressionExecutionBaseContext.REPLACE


▸ RIGHT(text, numberOfchars): string

Retruns specified number of charachters the right hand side of a text string

Parameters​

NameType
textstring
numberOfcharsnumber

Returns​

string

Inherited from​

ExpressionExecutionBaseContext.RIGHT


SUBSTITUTE​

▸ SUBSTITUTE(text, oldText, newText): string

Parameters​

NameType
textstring
oldTextstring
newTextstring

Returns​

string

Inherited from​

ExpressionExecutionBaseContext.SUBSTITUTE


UPPER​

▸ UPPER(text): string

Parameters​

NameType
textstring

Returns​

string

Inherited from​

ExpressionExecutionBaseContext.UPPER