Remove from Collection

This activity is used to remove a particular item from the collection.

Technical Reference

 

 

 

 

 

 

 

    

     MISC

Collection: This indicates the name of the collection variable from which the item has to be removed

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

Item: This indicates the name of the variable of the item which has to removed from the collection

Result: This indicates a variable for the output activity, and it defines only a Boolean Value. This is not a mandatory field.

TypeArgument: This indicates the type of the argument of the item which has to be removed. There are number of options from which we can choose.

*Mandatory fields to execute the workflow

As we are connecting this activity to the Add to Collections activity, follow the steps in the (link)

In continuation to the above steps lets create another variable here.

Example:

1.      Drag and drop a remove from collection activity from the collections feature to an existing workflow.

2.      Click on the activity and fill in the property box

3.      Add Name_Col to the collection box

4.      Add Name to the Item box

5.      Add the variable Out_Col in the result box.

6.      Select the TypeArgument as String since the item that we are going to remove from the collection is a string value

7.      Connect a Write Line activity below the Remove from Collections activity which gives an output to ensure that the item has been removed

8.      Enter the VB expression as “Final_Value:” +Name_Col.Count.ToString

9.      Execute the workflow

 

The value of the collection was 1.The bot has removed the item from the collection to give the final value as 0