Actions: Variables

clear variable

Set variable to an empty value.

Argument Description
VariableName The variable to set empty.

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

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

set array value

Create a path to access the value of nested elements.

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:
Old value: userDetails/email/ = tom@acme.com
New value: userDetails/email/ = andre@acme.com

Old value: userDetails/zipCode/ = 92592
New value: userDetails/zipCode/ = 98027
Array Select an array to modify.
Path A series of slash delimited array elements to modify a value of 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 Tue 7 Nov 2023 16:33:22 GMT