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

Use Case

Here we are going to automate and demonstrate the utilization of Collections feature.
The following activity illustrates on how we are going to remove the name which we
added to the collection of lists. Here we are continuing from the Add to collection activity,
so, we are going to remove the name in the following example.

As we are connecting this activity to the Add to Collections activity, follow the steps
in the Add To Collection | Robility Docs (sutherlandglobal.com)

Steps to execute the bot

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

2.      Navigate to the properties and add the variable as "Name_Col" to the collection box.

3.      Add the variable as "Name" to the Item box.

4.      Declare a variable as "Out_Col" in the result box.

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

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

7.      Enter the VB expression as “RemovalStatus:” +Out_Col.ToString

8.      Execute the workflow

The value of the collection was 1.The bot has removed the item from the
collection and returns the status as True.