Set Array Variable
The Set Array Variable action step enables you to assign new values to an array.
One possible use is to copy a list to an array in order to iterate through all elements in the list more easily and to process individual list elements further.
Properties
The Set Array Variable action step contains no other properties other than the general ones.
Inbound Variables
Array to change (Array) Array in which values are to be changed.
The array must have previously been created as a Workflow Based Variable or using Read from Excel File.
Please make sure that arrays are named according to their content. This makes a Workflow easier to understand.
It is preferable to create an extra array in the Workflow Based Variables rather than to overwrite an array created using the Read from Excel File action step with different values.
New array value (array or alphanumeric) Values to overwrite the entire array.
The entire array is rewritten with the given values. The former values are deleted.
By changing the values it is possible to also change the number of elements in the array (Array Count).
Wizard
The Array to change is the array with values to be overwritten. You can select it from a drop-down list if such an array already exists.
The New array value is the new values for overwriting the array. You can include them via a Pin Variable or enter them directly as a list of comma separated values in the relevant field.
The elements for array variables must be separated by commas.
The values for array variables are initially saved as strings. That is why, when saving the action step, all array elements which are not yet presented in double quotes will automatically be placed in double quotes.
If you want to include an element containing one or more commas in your list, you must place this element in double quotes before saving it.
E.g. “4,2” or “many commas: ,,,, , , ”
Text elements are permitted to contain single quotes:
E.g. “This ‘text’ contains single quotation marks.”
Text elements which need to contain double quotes must include another double quotation mark before each double quotation mark and the whole element also needs to be placed inside double quotes.
E.g. “This “”text”” contains double quotation marks.”
Example
Car servicing is to be automated at a workshop.
For testing purposes, the array Services, which is generated via the Workflow Based Variables and which contains the services actually performed, can be pre-populated with values. Further on in the Workflow, services are read from a scanned-in form, e.g. using OCR, and the array Services in the Set Array Variable action step is overwritten with the actual values.