0

in UiPath RPA, how can I create a collection variable with different datatypes? For example, a collection of strings, numbers, booleans or even arrays or lists. Tried to look in System.Collections.Generic, but couldn't find the relevant one.

Appreciate your Support Hara

Hara Gopal
  • 55
  • 2
  • 10

3 Answers3

1

Create a new variable. Select System.Collections.Generic.List<T> for the type, then select your custom class. Here's a collection custom objects.

list of excel cells

Alternatively, use an Array<T>, and then pick your custom class. The following image shows a string array:

string array

Wolfgang Radl
  • 2,319
  • 2
  • 17
  • 22
1

You can create a list of Objects by creating a new variable with type System.Collections.Generic.List<System.Object>. The Object class is the root class of the .NET type hierarchy, so the List can hold almost anything.

1

The best way is to create a Dictionary String/Object :

[1]: https://i.stack.imgur.com/inSuQ.png

Sebisnan
  • 11
  • 2