Actions: Variables

clear variable

Set variable to an empty value.

Argument Description
VariableName The variable to set empty.

count indexes in array

Gets the number of index keys present in an array.

Argument Description
Path An optional variable, element, or input that consists of a series of slash delimited indexes to access an array.
Variable The variable to have its indexes counted.
Output The location where the number of indexes will go (variable or text or field element).

count lines in variable

Gets the number of lines in a variable.

Argument Description
Variable A variable where the lines will be counted.
Output The location where the number of lines will go (variable or text or field element).

delete array element

Create a path to access the value of nested elements.

Argument Description
Value Select a variable that contains the element or value to delete.
Array Select an array to modify.
Path A series of slash delimited elements to remove data from an array.

Example:
Original array:
myUserData/email/kayla@acme.com
myUserData/zipCode/98027

Providing ‘zipCode’ for the path, we are left with the following in our array:
myUserData/email/kayla@acme.com

delete empty variables

Deletes all empty Appli variables. Useful in clearing out unused variables. Variables which your app populates will reappear.

find value in array

Find a specific value of a key inside the records of an array. This returns the first value that is found, so it works on arrays where the values are unique to each record.

Argument Description
Output Where do you want to save the result?
Key The key to query in the array
Operator The comparison operator for comparing values in the table against the input value.
KeyToReturn The key of the found record to return
Array Select an array to search
Value The value to compare the array record key against
ReturnAs If found, how should the result be returned?

get array value

Create a path to access the value of nested elements.

Argument Description
Array Select an array to parse.
RecordIDs Optional input from a variable, element, or raw input that consists of line or comma delimited list where each line or item is a valid cdbRecordID of a record in the specified table. Use “*” to specify all records or read an array from source other than a table.
Path A variable, element, or input that consists of a series of slash delimited elements to access a value of an array.
Output The returned value can be placed in a variable or an element.

Example array:
[6ea1f2aa-b7af-426e-879e-3c2caa54fa7a][email][mark@acme.org]
Path: email
Output: mark@acme.org

get item from variable

Gets the specified item from a variable.

Argument Description
Variable A variable where the item will be retrieved from.
ItemNumber The item number to retrieve from the variable.
Output The location where the item will go (variable or text or field element).
Separator The character(s) to use as the item separator for this operation. The default is a comma

get key from variable

Gets the specified key from a variable. Also works if the key is an array.

Argument Description
Output The location where the value of the key will go (variable or text or field element).
Variable A variable where the key will be retrieved from.
Key A variable or input specifying which key to get.

get line from variable

Gets the specified line from a variable.

Argument Description
Output The location where the line will go (variable or text or field element).
Variable A variable where the line will be retrieved from.
LineNumber A variable or input specifying which line to get.

process variable

Performs an algorithmic operation on the content of a variable. Base64Encode & Base64Decode, Compress & Decompress, BinaryEncode & BinaryDecode functions are available.

Argument Description
Variable The variable to be processed.
Process The function to process the variable.
Output The variable where the result will be placed.
Error A variable to store an error, should one occur.

reindex array

Reindexes an array to have sequential numeric indexes without gaps.

Argument Description
ArrayVariable The array variable to reindex

set array

Useful for creating or modifying an array with a new key = value.

Argument Description
Value The value will replace an existing value or can be used to create new values. The input may come from a variable, an element, or raw input.

Examples:
keys value
Old value: userDetails/email/ = tom@acme.com
New value: userDetails/email/ = andre@acme.com

keys value
Old value: userDetails/zipCode/ = 92592
New value: userDetails/zipCode/ = 98027
Array Select an array to create or modify.
Path A series of slash delimited keys in an array. The input may come from a variable, an element, or raw input.

set variable

Set a variable based on input, variable, or an element.

Argument Description
Variable The variable to set the value of.
Value The value to set variable to (input, variable, text/field element)

This chapter was last updated on Thu 5 Dec 2024 15:57:49 GMT