How can i delete a element from a List of String in UiPath

activities
studio

#1

How can I delete an item(by index) from a List? I know the function of the list.removeAt(index), but what activity can i use to apply this function? Can it be erased while iterating?

I would appreciate an answer as illustrative as possible.

Thank you very much, greetings!


#2

Yes you can use invoke method activity to call this method! :slight_smile:
And yest it can be erased while iterating!


#3

You can use Invoke Method Activity.

Parameters to pass:
TargetObject : List Variable
MethodName : RemoveAt
you have to pass index in the parameters from the Properties window.

image


#4

Refer to this screenshot @Yur

For a better understanding have a look here :slight_smile:
List_of_Strings.xaml (8.3 KB)

Let me know if it help :slight_smile:

Regards


#5

Thank you for your comment!!


#6

@Rishabh_Lakhera

Thank you for your comment!!
Finally I was able to get what I wanted,

Very friendly :wink:


#7

That’s what we’re here for :wink: