Calculation Library

Calculation Library


String Calculations

Calculation Name 

Arguments 

Description 

Notes

constant 

number 

returns the constant


field 

field reference 

returns the value of the field, which must be an  integer


field-or-default 

field: field reference 

default: string or string calculation.  Optional.

Returns the value of the field, if the reference  can be resolved. If it cannot be resolved,  returns the value of default if it is provided, or  returns unset value.


if 

expression: boolean calculation 

then: integer calculation 

else: integer calculation

if “expression” is true, returns the value of  “then”, if “expression” is false, returns the value  of “else”


if-set 

value: boolean calculation 

else: boolean calculation

If “value” is set, returns “value”. If “value” is not  set, returns “else” (which might not be set, that’ s ok)


form-assignments 

null or object with 

join: optional string or string calculation  group-format: optional string or string  calculation  

user-format:: optional string or string  calculation

Gets the currents assignments from the form  and formats them into a string. 

“join” specifies how they are to be joined, the  default is “, “ 

“group-format” specifies how the group names  are to be formatted, the default is the group  name 

“user-format” specifies how the user names are  to be formatted. The default is first name +  space + last name

group-format can  

either be “name” or a  string that contains  

“${name}” for where  the name should be  inserted. For example,  using “Group:  

${name}” for the  

HVAC group would  

result in “Group:  

HVAC” 

user-format can be  

one of the following:  email, name, or a  

string containing %{field } where field is one of  firstName, lastName,  emailAddress, id For  example,  

“${lastName},  

${firstName}” would  result in “Smith, John”

form-status 

null 

Returns the status of the form


format-date 

date: datetime calculation 

format: string calculation

Formats the date into a string using the format  string

uses the formatting  

rules defined Date  

Field Symbol Table 

format examples: 

digits: 

yyyy-MM-dd - 4 digit  year, 2 digit month  

and date 

yy-MM-dd - 2 digit  

year, 2 digit month  

and date 

abbreviations: 

yyyy-LLL-dd - 4 digit  year, abbreviated  

month (i.e. Sep), 2  

digit date

format-decimal 

decimal: decimal calculation 

separators: boolean (optional, defaults to  false) 

locale: string (optional, defaults to user  setting) 

minimum-integer-digits: positive integer  (optional, defaults to 1) 

minimum-fraction-digits: non-negative  integer (optional, defaults to 0) 

maximum-fraction-digits: non-negative  integer (optional, defaults to 3)

Evaluates the decimal and formats it.  

If separators is true, adds thousands  

separators (commas in the US) 

minimum integer digits can be used to zero pad to the left 

minimum and maximum fraction digits control  how many digits below the decimal 

locale can be used to override the locale for the  separators and decimal point (note: this relies  on the browser, and does not work in the AWS  repository)


format-duration 

duration: duration calculation 

format: string

Evaluates the duration and formats it. The  format must be one of the following: 

"hours" 

"hours only" 

"minutes" 

"minutes only" 

"seconds" 

"H:mm" 

"H:mm:ss" 

"m:ss"


format-integer 

integer: integer calculation 

separators: boolean (optional, defaults to  false) 

locale: string (optional, defaults to user  setting) 

minimum-digits: positive integer (optional,  defaults to 1)

Evaluates the integer and formats it.  

If separators is true, adds thousands  

separators (commas in the US) 

minimum digits can be used to zero-pad to the  left 

locale can be used to override the locale for the  separators(note: this relies on the browser, and  does not work in the AWS repository)


format-user 

user: user calculation 

format: string or string calculation

Returns user information, formatted using the  format string

format can be one of  the following: email,  name, or a string  

containing %{field}  

where field is one of  firstName, lastName,  emailAddress, id For  example,  

“${lastName},  

${firstName}” would  result in “Smith, John”

join-array-strings 

array: field reference to an array 

string: field reference or string calculation join: string or string calculation (defaults  to a space) 

filter: field reference or boolean  

calculation (optional)

Loops over the “array”. Checks “filter” against  each member (if specified), skipping any where  “filter” returns false. Applies “string” to each  member to find a string value, and returns the  strings joined together into one string. If join is  specified, it is inserted between the strings.

unset strings are  

ignored

join-list-of-strings 

list: array of strings or string calculations join: string or string calculation (defaults  to a space)

Returns the strings in list joined together into  one string. If join is specified, it is inserted  between the strings.

unset strings are  

ignored

lowercase 

string calculation 

Returns the string in lowercase 

if string is unset,  

returns unset

uppercase 

string calculation 

Returns the string in UPPERCASE 

if string is unset,  

returns unset

current-user-email 

null 

Returns the email address for the current user


name-for-group-id 

group id calculation 

Returns the name of the group based on the  group id argument


email-for-user 

user calculation 

Returns the email address for the user based  on the user calculation.

Throws when: 

User calculation  

fails to provide a  

user 

User’s email is  

undefined

switch-on-integer 

integer: integer calculation 

cases: object 

default: string or string calculation  (optional) 

unset: string or string calculation (optional)

The cases object has keys that are integer-like strings and values that are string or string  calculation 

evaluates the integer, and looks in the cases  object for a matching key, and return the  corresponding value. 

if the evaluation is unset, returns the value from  unset 

if no match is found, returns the value from  default. Returns unset value if there is no  default


switch-on-string 

string: string calculation 

cases: object 

default: string or string calculation  (optional) 

unset: string or string calculation (optional)

The cases object has values that are string or  string calculation 

evaluates the string, and looks in the cases  object for a matching key, and return the  corresponding value. 

if the evaluation is unset, returns the value from  unset 

if no match is found, returns the value from  default. Returns unset value if there is no  default



Boolean Calculations

Boolean calculations will always result in either true or false.

Calculation Name 

Arguments 

Description 

Notes

constant 

true or false 

Select true or false to always be returned.


field 

field reference 

Returns the value of a field on your form. You will get the field selector window to select the field you want to reference.


field-or-default 

field: field reference 

default: another boolean calculation (optional)

Returns the value of a field on your form. if the reference can be resolved. If it  cannot be resolved, returns the value of default if it is provided, or  returns unset value.


has-value 

field reference 

returns true if the field’s value is set, and false if it is unset


if 

expression: boolean  

calculation 

then: boolean calculation else: boolean calculation

if “expression” is true, returns the value of “then”, if “expression” is  false, returns the value of “else”


if-set 

value: boolean calculation else: boolean calculation

If “value” is set, returns “value”. If “value” is not set, returns “else”  (which might not be set, that’s ok)


equals-datetime 

array of at least two datetime  calculations

true if all of the arguments are equal


greater-than-or-equal-datetime 

array of two datetime  

calculations

true if the first argument is greater than or equal to the second 

if one is  

unset,  

returns  

unset 

if both are  

unset,  

returns true

greater-than-datetime 

array of two datetime  

calculations

true if the first argument is greater than the second 

if either is  

unset,  

returns  

unset

less-than-or-equal-datetime 

array of two datetime  

calculations

true if the first argument is less than or equal to the second 

if one is  

unset,  

returns  

unset 

if both are  

unset,  

returns true

less-than-datetime 

array of two datetime  

calculations

true if the first argument is less than then second 

if either is  

unset,  

returns  

unset

equals-decimal 

array of at least two decimal  calculations

true if all of the arguments are equal


greater-than-or-equal-decimal 

array of two decimal  

calculations

true if the first argument is greater than or equal to the second 

if one is  

unset,  

returns  

unset 

if both are  

unset,  

returns true

greater-than-decimal 

array of two decimal  

calculations

true if the first argument is greater than the second 

if either is  

unset,  

returns  

unset

less-than-or-equal-decimal 

array of two decimal  

calculations

true if the first argument is less than or equal to the second 

if one is  

unset,  

returns  

unset 

if both are  

unset,  

returns true

less-than-decimal 

array of two decimal  

calculations

true if the first argument is less than then second 

if either is  

unset,  

returns  

unset

equals-duration 

array of at least two duration  calculations

true if all of the arguments are equal


greater-than-or-equal-duration 

array of two duration  

calculations

true if the first argument is greater than or equal to the second 

if one is  

unset,  

returns  

unset 

if both are  

unset,  

returns true

greater-than-duration 

array of two duration  

calculations

true if the first argument is greater than the second 

if either is  

unset,  

returns  

unset

less-than-or-equal-duration 

array of two duration  

calculations

true if the first argument is less than or equal to the second 

if one is  

unset,  

returns  

unset 

if both are  

unset,  

returns true

less-than-duration 

array of two duration  

calculations

true if the first argument is less than then second 

if either is  

unset,  

returns  

unset

equals-integer 

array of at least two integer  calculations

true if all of the arguments are equal


greater-than-or-equal-integer 

array of two integer  

calculations

true if the first argument is greater than or equal to the second 

if one is  

unset,  

returns  

unset 

if both are  

unset,  

returns true

greater-than-integer 

array of two integer  

calculations

true if the first argument is greater than the second 

if either is  

unset,  

returns  

unset

less-than-or-equal-integer 

array of two integer  

calculations

true if the first argument is less than or equal to the second 

if one is  

unset,  

returns  

unset 

if both are  

unset,  

returns true

less-than-integer 

array of two integer  

calculations

true if the first argument is less than then second 

if either is  

unset,  

returns  

unset

and 

array of at least two boolean  calculations

true of all of the arguments are true, false if any of them are false 

unset  

values are  

ignored, but  if all are  

unset,  

returns  

unset

not 

boolean calculation 

true if the argument is false, false if it is true 

returns  

unset if  

unset

or 

array of at least two boolean  calculations

true if any of the arguments are true, false if all of them are false 

unset  

values are  

ignored, but  if all are  

unset,  

returns  

unset

empty-string 

string calculation 

true if the string is empty 

returns  

unset if  

unset

equals-string 

array of two string calculations 

true if the strings are equal, case sensitive


list-includes-string 

list: array of strings or string  calculations 

string: string calculation

True if the string is found in the list of strings. 

The list can contain both string calculations and JSON strings.


regexp-matches-string 

string: string calculation 

regexp: a string that is a  

regular expression 

ignore-case: boolean,  

optional, defaults to false multiline: boolean, optional,  defaults to false 

dot-all: boolean, optional,  defaults to false

Checks to see if the regular expression matches the string, returns  true if it does. Regular Expressions are very powerful and can  handle most matching concepts. See Writing a regular expression  pattern for full information.

returns  

unset if  

string is  

unset

switch-on-integer 

integer: integer calculation cases: object 

default: boolean or boolean  calculation (optional) 

unset: boolean or boolean  calculation (optional)

The cases object has keys that are integer-like-strings and values  that are boolean or boolean calculation 

evaluates the integer, and looks in the cases object for a matching  key, and return the corresponding value. 

if the evaluation is unset, returns the value from unset 

if no match is found, returns the value from default, or unset value if  there is no default


switch-on-string 

string: string calculation 

cases: object 

default: boolean or boolean  calculation (optional) 

unset: boolean or boolean  calculation (optional)

The cases object has values that are boolean or boolean calculation 

evaluates the string, and looks in the cases object for a matching  key, and return the corresponding value. 

if the evaluation is unset, returns the value from unset 

if no match is found, returns the value from default, or unset value if  there is no default


equals-userid 

array of two userid  

calculations

True if the user ids match, otherwise false


equals-groupid 

array of two grouped  

calculations

True if the user ids match, otherwise false



Array Calculations 

Calculation Name 

Arguments 

Description 

Notes

field 

field reference 

returns the value of the field, which must be  an array


field-or-default 

field: field reference 

default: array calculation.  Optional.

Returns the value of the field, if the  reference can be resolved. If it cannot be  resolved, returns the value of default if it is  provided, or returns empty array.


if 

expression: boolean  

calculation 

then: array calculation 

else: array calculation

if “expression” is true, returns the value of  “then”, if “expression” is false, returns the  value of “else”


if-set 

value: boolean calculation else: boolean calculation

If “value” is set, returns “value”. If “value” is  not set, returns “else” (which might not be  set, that’s ok)



DateTime Calculations

Calculation Name 

Arguments 

Description 

Notes

constant 

an object with the keys “day”, “month”,  “year”, “hour”, “minute”, and “second”. The  value for each key must be a number

returns the constant


field 

field reference 

returns the value of the field, which must be a  date time


field-or-default 

field: field reference 

default: date time or date time calculation.  Optional.

Returns the value of the field, if the reference  can be resolved. If it cannot be resolved,  returns the value of default if it is provided, or  returns unset value.


if 

expression: boolean calculation 

then: date time calculation 

else: date time calculation

if “expression” is true, returns the value of  “then”, if “expression” is false, returns the  value of “else”


if-set 

value: date time calculation 

else: date time calculation

If “value” is set, returns “value”. If “value” is not  set, returns “else” (which might not be set, that’ s ok)


max-array-datetime 

array: field reference to an array 

date time: field reference or date time  calculation 

filter: boolean calculation (optional)

Returns the latest of the date times in the  array.


min-array-datetime 

array: field reference to an array 

date time: field reference or date time  calculation 

filter: boolean calculation (optional)

Returns the earliest of the date times in the  array


now 

null 

returns the current time and date


diff-datetime-and-druation 

array of one date time calculation and one  duration calculation

Returns the date time, minus the duration 

if either is unset,  

returns unset

parse-formatted-string 

string: string calculation 

format: string

evaluates the string and parses it into a date,  using the format given. Format is required.  Returns unset value if parsing fails.

See format-date for  formats 

if string is unset,  

returns unset

sum-datetime-and-druation 

array of one date time calculation and one  duration calculation

Returns the date time, plus the duration 

if either is unset,  

returns unset

switch-on-integer 

integer: integer calculation 

cases: object 

default: date time or date time calculation  (optional) 

unset: date time or date time calculation  (optional)

The cases object has keys that are integer like-strings and values that are date time or  date time calculation 

evaluates the integer, and looks in the cases  object for a matching key, and return the  corresponding value. 

if the evaluation is unset, returns the value  from unset 

if no match is found, returns the value from  default. Returns unset value if there is no  default


switch-on-string 

string: string calculation 

cases: object 

default: date time or date time calculation  (optional) 

unset: date time or date time calculation  (optional)

The cases object has values that are date  time or date time calculation 

evaluates the string, and looks in the cases  object for a matching key, and return the  corresponding value. 

if the evaluation is unset, returns the value  from unset 

if no match is found, returns the value from  default. Returns unset value if there is no  default


today 

null 

returns the current and date



Integer / Decimal Calculations

Calculation Name 

Arguments 

Description 

Notes

average-array-decimal 

array: field reference to an array 

decimal: field reference or decimal  calculation 

filter: boolean calculation (optional)

Returns the average of the decimals in the  array.

unset values are  

skipped and not  

counted

constant 

number 

returns the constant


field 

field reference 

returns the value of the field, which must be a  decimal


field-or-default 

field: field reference 

default: decimal or decimal calculation.  Optional.

Returns the value of the field, if the reference  can be resolved. If it cannot be resolved,  returns the value of default if it is provided, or  returns unset value.


if 

expression: boolean calculation 

then: decimal calculation 

else: decimal calculation

if “expression” is true, returns the value of  “then”, if “expression” is false, returns the  value of “else”


if-set 

value: boolean calculation 

else: boolean calculation

If “value” is set, returns “value”. If “value” is not  set, returns “else” (which might not be set, that’ s ok)


diff-decimal 

array of two decimal calculations 

returns the first minus the second 

if either is unset,  

returns unset

div-decimal 

array of two decimal calculations 

returns the first divided by the second 

if either is unset,  

returns unset

product-decimal 

array of at least two decimal calculations 

returns the product 

if any is unset,  

returns unset

max-array-decimal 

array: field reference to an array 

decimal: field reference or decimal  calculation 

filter: boolean calculation (optional)

Returns the largest (most positive) of the  decimals in the array.

unset values are  

skipped

min-array-decimal 

array: field reference to an array 

decimal: field reference or decimal  calculation 

filter: boolean calculation (optional)

Returns the least positive of the decimals in  the array

unset values are  

skipped

sum-decimal 

array of at least two decimal calculations 

returns the sum 

if any is unset,  

returns unset

sum-array-decimals 

array: field reference to an array 

decimal: field reference or decimal  calculation 

filter: boolean calculation (optional)

Loops over the “array”. Checks “filter” against  each member (if specified), skipping any  where “filter” returns false. Applies “decimal”  to each member to find a decimal value, and  returns the sum

if any decimal is  

unset, returns unset

parse-string 

string calculation 

evaluates the string and parses it into a  decimal


switch-on-integer 

integer: integer calculation 

cases: object 

default: decimal or decimal calculation  (optional) 

unset: decimal or decimal calculation  (optional)

The cases object has keys that are integer like-strings and values that are decimal or  decimal calculation 

evaluates the integer, and looks in the cases  object for a matching key, and return the  corresponding value. 

if the evaluation is unset, returns the value  from unset 

if no match is found, returns the value from  default. Returns unset value if there is no  default


switch-on-string 

string: string calculation 

cases: object 

default: decimal or decimal calculation  (optional) 

unset: decimal or decimal calculation  (optional)

The cases object has values that are decimal  or decimal calculation 

evaluates the string, and looks in the cases  object for a matching key, and return the  corresponding value. 

if the evaluation is unset, returns the value  from unset 

if no match is found, returns the value from  default. Returns unset value if there is no  default



Integer Calculations

Calculation Name 

Arguments 

Description 

Notes

constant 

number 

returns the constant


field 

field reference 

returns the value of the field, which must be  an integer


field-or-default 

field: field reference 

default: integer or integer calculation.  Optional.

Returns the value of the field, if the reference  can be resolved. If it cannot be resolved,  returns the value of default if it is provided, or  returns unset value.


if 

expression: boolean calculation 

then: integer calculation 

else: integer calculation

if “expression” is true, returns the value of  “then”, if “expression” is false, returns the  value of “else”


if-set 

value: boolean calculation 

else: boolean calculation

If “value” is set, returns “value”. If “value” is not  set, returns “else” (which might not be set, that’ s ok)


length-string 

string calculation 

returns the length of the string 

if string is unset,  

returns unset

length-array 

array calculation 

returns the length of the array


max-array-integer 

array: field reference to an array 

integer: field reference or integer calculation filter: boolean calculation (optional)

Returns the largest (most positive) of the  integers in the array.

unset values are  

skipped

min-array-integer 

array: field reference to an array 

integer: field reference or integer calculation filter: boolean calculation (optional)

Returns the least positive of the integers in the  array

unset values are  

skipped

ceiling-decimal 

decimal calculation 

converts the decimal to the next most positive  integer. So, 1.1 becomes 2 and -1.1 becomes  -1

if decimal is unset,  returns unset

diff-integer 

array of two integer calculations 

returns the first minus the second 

if either is unset,  

returns unset

div-integer 

array of two integer calculations 

returns the first divided by the second 

if either is unset,  

returns unset

floor-decimal 

decimal calculation 

converts the decimal to the next most negative  integer. So, 1.1 becomes 1 and -1.1 becomes  -2

if decimal is unset,  returns unset

parse-hexadecimal-string 

string calculation 

evaluates the string and parses it into an  integer using base 16

if string is unset or  parsing fails,  

returns unset

parse-string 

string calculation 

evaluates the string and parses it into an  integer

if string is unset or  parsing fails,  

returns unset

product-integer 

array of at least two integer calculations 

returns the product 

if any is unset,  

returns unset

round-decimal 

decimal calculation 

rounds the decimal to the nearest integer. 1.1 becomes 1 and -1.1 becomes -1 

1.7 becomes 2 and -1.7 becomes -2

if decimal is unset,  returns unset

sum-integer 

array of at least two integer calculations 

returns the sum 

if any is unset,  

returns unset

sum-array-integers 

array: field reference to an array 

integer: field reference or integer calculation filter: boolean calculation

Loops over the “array”. Checks “filter” against  each member (if specified), skipping any  where “filter” returns false. Applies “integer” to  each member to find a decimal value, and  returns the sum

if any is unset,  

returns unset

switch-on-integer 

integer: integer calculation 

cases: object 

default: integer or integer calculation  (optional) 

unset: integer or integer calculation  (optional)

The cases object has keys that are integer like-strings and values that are integer or  integer calculation 

evaluates the integer, and looks in the cases  object for a matching key, and return the  corresponding value. 

if the evaluation is unset, returns the value  from unset 

if no match is found, returns the value from  default. Returns unset value if there is no  default


switch-on-string 

string: string calculation 

cases: object 

default: integer or integer calculation  (optional) 

unset: integer or integer calculation  (optional)

The cases object has values that are integer  or integer calculation 

evaluates the string, and looks in the cases  object for a matching key, and return the  corresponding value. 

if the evaluation is unset, returns the value  from unset 

if no match is found, returns the value from  default. Returns unset value if there is no  default


truncate-decimal 

decimal calculation 

converts the decimal by stripping its fractional  part

if decimal is unset,  returns unset

Duration Calculations

Calculation Name 

Arguments 

Description 

Notes

average-array-duration 

array: field reference to an array 

decimal: field reference or duration  calculation 

filter: boolean calculation (optional)

Returns the average of the durations in the  array.

unset values are  

skipped and not  

counted

constant 

number 

returns the constant


field 

field reference 

returns the value of the field, which must be a  duration


field-or-default 

field: field reference 

default: duration or duration calculation.  Optional.

Returns the value of the field, if the reference  can be resolved. If it cannot be resolved,  returns the value of default if it is provided, or  returns unset value.


if 

expression: boolean calculation 

then: duration calculation 

else: duration calculation

if “expression” is true, returns the value of  “then”, if “expression” is false, returns the  value of “else”


if-set 

value: boolean calculation 

else: boolean calculation

If “value” is set, returns “value”. If “value” is not  set, returns “else” (which might not be set, that’ s ok)


diff-datetime 

array of two date time calculations 

Returns the first minus the second 

if either is unset,  

returns unset

diff-duration 

array of two duration calculations 

Returns the first minus the second 

if either is unset,  

returns unset

max-array-duration 

array: field reference to an array 

duration: field reference or duration  calculation 

filter: boolean calculation (optional)

Returns the largest (most positive) of the  durations in the array.

unset values are  

skipped

min-array-duration 

array: field reference to an array 

duration: field reference or duration  calculation 

filter: boolean calculation (optional)

Returns the least positive of the durations in  the array

unset values are  

skipped

parse-formatted-string 

string: string calculation 

format: string

evaluates the string and parses it into a  duration, using the format given. Format is  required. Returns unset value if parsing fails.

See format-duration  for formats

sum-array-durations 

array: field reference to an array 

duration: field reference or duration  calculation 

filter: boolean calculation (optional)

Loops over the “array”. Checks “filter” against  each member (if specified), skipping any  where “filter” returns false. Applies “decimal”  to each member to find a decimal value, and  returns the sum

if any decimal is  

unset, returns unset

sum-duration 

array of at least two duration calculations 

Returns the sum 

if either is unset,  

returns unset

switch-on-integer 

integer: integer calculation 

cases: object 

default: duration or duration calculation  (optional) 

unset: duration or duration calculation  (optional)

The cases object has keys that are integer like-strings and values that are duration or  duration calculation 

evaluates the integer, and looks in the cases  object for a matching key, and return the  corresponding value. 

if the evaluation is unset, returns the value  from unset 

if no match is found, returns the value from  default. Returns unset value if there is no  default


switch-on-string 

string: string calculation 

cases: object 

default: duration or duration calculation  (optional) 

unset: duration or duration calculation  (optional)

The cases object has values that are duration  or duration calculation 

evaluates the string, and looks in the cases  object for a matching key, and return the  corresponding value. 

if the evaluation is unset, returns the value  from unset 

if no match is found, returns the value from  default. Returns unset value if there is no  default



Group Calculations 

Calculation Name 

Arguments 

Description 

Notes

group-by 

name

string or string  

calculation

Returns the group associated with the name provided by the string or  string calculation

Throws when: 

String calculation fails to provide  a value


Group ID Calculations 

Calculation Name 

Arguments 

Description 

Notes

constant 

string 

returns the group named


field 

field reference 

returns the value of the field, which must be a group ID field


field-or-default 

field: field reference 

default: group ID calculation.  Optional.

Returns the value of the field, if the reference can be resolved. If it  cannot be resolved, returns the value of default if it is provided, or  returns unset value.


if 

expression: boolean  

calculation 

then: group ID calculation else: group ID calculation

if “expression” is true, returns the value of “then”, if “expression” is  false, returns the value of “else”


if-set 

value: boolean calculation else: boolean calculation

If “value” is set, returns “value”. If “value” is not set, returns “else”  (which might not be set, that’s ok)


group-id-for-group 

Group calculation 

Returns the group id of the group defined by the user calculation 

returns  

unset if  

group is  

invalid

group-id-for-user 

User calculation 

Returns the group id associated with the user defined by the user  calculation

returns  

unset if  

user is  

invalid

parent-id-for-group-id 

Group id calculation 

Returns the parent group id as defined by the group id calculation 

returns  

unset if  

group is  

invalid


Image Calculations

Calculation Name 

Arguments 

Description 

Notes

constant 

object with keys 

encoding: 

type: 

content:



field 

field reference 

returns the value of the field, which must be a image field


field-or-default 

field: field reference 

default: image calculation.  Optional.

Returns the value of the field, if the reference can be resolved. If it  cannot be resolved, returns the value of default if it is provided, or  returns unset value.


if 

expression: boolean  

calculation 

then: image calculation 

else: image calculation

if “expression” is true, returns the value of “then”, if “expression” is  false, returns the value of “else”


if-set 

value: boolean calculation else: boolean calculation

If “value” is set, returns “value”. If “value” is not set, returns “else”  (which might not be set, that’s ok)



User Calculations 

Calculation Name 

Arguments 

Description 

Notes

current-user 

null 

returns the current user


user-by-email 

String calculation 

returns the user with the specified email


user-by-id 

User ID calculation 

returns the user with the ID specified



User ID Calculations

Calculation Name 

Arguments 

Description 

Notes

field 

field reference 

returns the value of the field, which must be a user ID field


field-or-default 

field: field reference 

default: user id calculation.  Optional.

Returns the value of the field, if the reference can be resolved. If it  cannot be resolved, returns the value of default if it is provided, or  returns unset value.


if 

expression: boolean  

calculation 

then: user ID calculation 

else: user ID calculation

if “expression” is true, returns the value of “then”, if “expression” is  false, returns the value of “else”


if-set 

value: boolean calculation else: boolean calculation

If “value” is set, returns “value”. If “value” is not set, returns “else”  (which might not be set, that’s ok)


id-for-user 

user calculation 

Returns the ID of the user