2d array initialization

studio

#1

i want to use 2d array in uipath. after i declare my 2d array in variable section, i am trying to initialize like this but i am getting error

{{"",""},{"",""}}


#2

Hello @venkat4u,

You can use the following sintax to initialize a 2d array: {({“1”,“2”}),({“3”,“4”})}.
Here is an example :slight_smile:
2dArray.xaml (4.6 KB)

Best Regards,
Susana


#3

Thanks for your response.
I will check


#4

Hello @Susana,

thank you so much for your response it is working.
i also want to know if i want to define the size of array in variables panel, how can i ?

i used new string(0)(){} - no validation error.
after that if i try to assign its throwing error

using assing like below
array(0)(0) = “1”

the error is Object null Reference