How to find and delete an item from the List of Strings?

can you please help me with my issue? I have a List of Strings and I need to find a and completely delete one value. Let’s say I have this list:

0: “aaa”
1: “bbb”
2: “ccc”
3: “ddd”

Now I have a variable with value “bbb” and I need to check if it’s part of the list and completely delete it and shorten the list by 1 to make it look like this:

0: “aaa”
1: “ccc”
2: “ddd”

Is it possible?
Thank you.

@danlicka Use Invoke Method Activity to remove the item from the list in this way as shown in Screenshots:

In the arguments Panel of the Invoke Method Activity include this:

The “aaa” should be an exact value in the list


as an alternate you can do.
yourListVar.Where(Function (x) Not x.equals(“bbb”)).toList

you will use it within an assign activity:
left side: yourListVar
right side: the statement from above


Perfect, thank you both!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.