Split
This is a pre-built Action located under the @Generic Element. The functionality of this Action in Avo Assure is to split a given string into smaller parts using a specified separator or character. The resulting parts are stored in a dynamic variable.
Syntax
Input Value: <string>;<split character>
<string>
(Required)
Provide the string that needs to be split.
<split character> (Required)
Provide the character or symbol that determines where the string should be divided (for example, a comma (,), space, or number).
Output Value: <Dynamic Variable>;<Dynamic Variable>(Optional)
<Dynamic Variable> (Required)
This dynamic variable stores the separated string.
<Dynamic Variable> (Optional)
This dynamic variable Stroe the status as True or False.
Example: Splitting a String
In this example, we explain how to divide a string into separate parts.
Action: Split
Input Value: John&Smith;&
The first argument (John&Smith) specifies the string to be split.
The second argument (&) specifies the delimiter or split character.
Output Value: {Split Values}
The resulting list of split strings (['John', 'Smith']) is stored in this {Split Values} dynamic variable.
If the second output variable is defined, it stores the action status with the following possible values:
True: If the string is successfully split using the specified delimiter.
False: If the split operation fails due to an invalid or missing delimiter.
Logical Explanation: The Split action fetches the value from the Input Value column (John&Smith;&) and splits it into parts using the specified split character (&). The resulting list of split values (['John', 'Smith']) is stored in the {Split Values} variable.

Example 2: Accessing and Displaying a Specific Word from a Split String
In this example, we explain how to split a string, retrieve a specific word using its array index, and display it.
Action: Split
Input Value: John&Smith&David;&
The first argument (John&Smith&David) specifies the string to be split.
The second argument (&) specifies the delimiter or split character.
Output Value: {Split Values}
The resulting list of split string (['John', 'Smith', 'David']) is stored in this {Split Values} dynamic variable.
If the second output variable is defined, it stores the operation status with the following possible values:
True: If the string is successfully split.
False: If the split operation fails due to an invalid delimiter or empty string.
Using Array Index:
{Split Values[0]} → stores John
{Split Values[1]} → stores Smith
{Split Values[2]} → stores David
Logical Explanation: The Split action takes the value from the Input Value column (John&Smith&David;&) and splits it into parts using the specified split character (&). It stores the list of split values in the {Split Values} dynamic variable as ['John', 'Smith', 'David']. Using array indexing, the user can retrieve a specific word from the split array. In this scenario, the Display Variable Value action displays the 0th index value of the split strings by using the {Split Values[0]} variable as input and shows the value (John).

Knowledge Bites:
Here are some examples of different string scenarios:
Text Strings
List & Task;&
"List", "Task"
Numeric Strings
1223524214;5
"1223", "24214"
Special Character
abc@do & main.com;&
"abc@do", "main.com"
Alphanumeric strings
ID87&6;&
"ID87", "6"
Last updated
Was this helpful?