Append List

Estimated reading: 3 minutes 153 views

This activity is used to add new values to an existing list variable. It updates the list by appending the specified items without overwriting the current contents.

Properties

Input

Item To Append: *Specifies to provide the value that needs to be added to the existing list.

List: *Specifies to provide the list variable from which the value needs to be retrieved.

MISC

Display Name: Displays the name of the activity. The activity name can be customized, which aids in troubleshooting.

SkipOnError: Specify the “Boolean” value as “True” or “False.”

True: Continue executing the workflow regardless of any errors thrown.
False: Halt the workflow if it encounters any errors.
None: If the option is left blank, the activity will, by default, behave as if “False” were chosen.

Type Argument: Select the type of variable for the list provided from the drop-down.
For example, if it is a list of strings, choose “String” as the argument type.

By default, the argument type should be as “String”.

Version: It indicates the version of the feature being used.

OUTPUT

Result: This parameter allows you to view the execution status of the activity and returns a value in “Boolean.”

True: Indicates that the activity has been executed successfully without any errors.
False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown.

Item index: *Returns the position of the item that has been added to the list in Int32 datatype.

* Represents mandatory fields to execute the workflow.

Example

The following example demonstrates how to create a list and then append values to it:

Step 1: Create the list

1. Drag and drop the Create List activity and set the TypeArgument to Integer.
2. In the NewList parameter, declare a variable (e.g., newList).

a. At this stage, an empty list of integers is created.

Step 2: Append value to the list

3. Add the Append List activity after the Create List activity.
4. In the Item to append property, enter the value 145.
5. In the List property, provide the variable you created earlier (newList).
6. Ensure the TypeArgument is set to Integer.

Step 3: Read the appended value

7. In the output section of the Append List activity, declare a variable in the ItemIndex field to capture the index of the appended item.
8. Add a Read List activity and set the ItemIndex property to the variable from step 7.
9. Provide the same list variable (newList) in the List property.
10. In the output section of the Read List activity, declare a variable to store the retrieved value.

Step 4: Display the result

11. Add a Write Log activity and use the following expression to print the appended item:

“ReadList.ToString”.

Now, you can view the appended list to the existing list.

Share this Doc

Append List

Or copy link

CONTENTS