FUNCTIONS
These functions can be used in calculations as well as in field rules:
float(value, emptyVal)
safely converts a value to a floating point number
string(value)
converts value to a character string
integer(value, emptyVal)
safely converts a value to an integer
bool(value)
safely converts a value to a boolean (true/false)
listContainsValues($list_field_key$, ['value 1', 'value 2'])
checks if List from a List Selector field contains a set of values
listContainsValue($list_field_key$, ['value'])
checks if List from a List Selector field contains a single value
concatenateSubformField($subform$, 'fieldKey', 'delimiter', includeEmptyValues)
$subform$ - the field key on the main form of the sub form field
'fieldkey' - the field key in the sub form that you want to pull into the main form
'delimiter' - one or more characters that separate text strings; this can be any character (for example '|', '-', '/')
includeEmptyValues - you will want to enter true or false here, this will either include or exclude empty values from the sub form.
sumSection($section$, 'fieldkey')
sumSubform($subform$, 'fiedkey')
SCRIPT RULES FUNCTIONS
These functions can only be used in field rules using the script section:
hide(optional fieldKey) - hide a field. If the Field Key is not specified, the field that the script is written for will be used.
show(optional fieldKey) - show a field. If the Field Key is not specified, the field that the script is written for will be used.
hideSection(optional sectionKey) - hides an entire section. If the Section Key is not provided, the current section will be used.
showSection(optional sectionKey) - shows an entire section. If the Section Key is not provided, the current section will be used.
required (optional fieldKey) - sets a field as required. If the Field Key is not specified, the field that the script is written for will be used.
notRequired(optional fieldKey) - sets a field as not required. If the Field Key is not specified, the field that the script is written for will be used.
disable(optional fieldKey) - sets a field as disabled. If the Field Key is not specified, the field that the script is written for will be used.
enable(optional fieldKey) - sets a field as enabled. If the Field Key is not specified, the field that the script is written for will be used.
hideOnReport('fieldKey') - conditionally hide a field from the default reports. If the Field Key is not specified, the field that the script is written for will be used.
showOnReport('fieldKey') - conditionally show a field on the default reports. If the Field Key is not specified, the field that the script is written for will be used.
VARIABLES
Variable | Email Subject/Body |
Sequence Number | [sequenceNumber] |
Submission ID | [submissionId] |
Account ID | [accountId] |
Form Name | [formName] |
Form ID | [formId] |
Form Version | [formVersion] |
Username | [userName] |
User ID | [userId] |
Last Updated Time | [updatedAt] |
$subFormInstanceItemNumber$
Use this in a calculation field to see which instance of the subform you are in. For the first instance of the subform it will display a '1', for the second '2', and so on. You can use this as a counter within your sub form or to create an incremental number within your sub form.
$CURRENT_USER_VAR$
Use this in a calculation field to pull in the username(email address) of the user logged in to the app to complete the form.