Is Two-Dimensional Array is Supported in UiPath?

studio

#1

I guess the subject is quite straight-forward,
is there any way to store a two-dimensional array in UiPath?
Preferably where we could assign the index like assigning arrayName[2][name] = “something”.
And we will have

arrayName[0][name] : NULL
arrayName[1][name] : NULL
arrayName[2][name] : “something”

(I was thinking of DataTable, but DataTable doesn’t support assigning value by index).

Any idea?


#2

Hi @whyyouandi,

Yes, it possible to declare two-dimensional array in UiPath. Try in variables section to set Variable Type to Array of [T] and as T set Array of [T]. As a second T set desired type. Also you have to initialize this array. Try this example (I’m not VB programmer so maybe is a better way to do it): multi_dim_array.xaml (5,7 KB)


#3

@bstando Marked as solution for the multi-dimensional array declaration.
Still struggling with the initialization (I’m no VB programmer myself) but will try it again. Thanks!