How to use Methods(Insert, Sort, AddRange, Contains, Remove) for List Variable

variable

#1

I have a List Variable. according to C# language, we have methods for List Variables.The methods Are
Insert, Sort, AddRange, Contains, Remove like that we have some more.
I want to perform this method in Ui Path. How?when I tried but getting errors.

So please any Solve this and send me this workflow

Thanks in Advance .
Chinnapu Reddy


#2

What error you are getting…??


#3

@chinnapureddy03
Suppose if ur having a list varaiable Lst A - List of strings.
ListB-List of strings , Where you want add it to ListA

Let us take stra which you want alter in the list ListA

1.ListA.Add(stra)
2.ListA.Sort()
3.ListA.Contains(stra)
4.ListA.AddRange(ListB)
5.List.Remove(stra)
6.ListA.Insert(Position,stra)

position-the index where you want to insert the string.

Regards,
Mahesh


#4

HI @chinnapureddy03,

Refer this xaml file to how to add to value in the list
invoke_list.xaml (6.9 KB)

Regards,
Arivu


#5

Thanks @arivu96


#6

How about remove from list at index position?


#7

Hi @FlpVsg,

You can use Remove at like below

File : LstRemove.zip (1.8 KB)

Regards
Balamurugan


#8

Thanks!