Multidimensional arrays

collections

#1

Hello.
Please, explain how to work in UiPath with multidimensional arrays? How to declare them and how to write value into them after declaring?


#2

Hi Fitc!

You declare them putting a “For each” into other “For each” (first for rows, second for columns).

EDIT:
You write values inside of second “For each”.

For each row {
For each column{
variable = value
column = column + 1
}
row = row + 1
}

I hope help you.


Initialize Array Of Array, Fill and Put in DataTable
#3

Java, thank you, but that’s not what I asked for.
What variable type should I use to create a dynamic multidimensional array?
If I use array(of array), I can’t change the size of the array.
List doesn’t work because if I try to write a value into it, for example, list(1)(0)= 111 , list(2)(0) also becomes “111”.
What I want is declaring like list_new (2,3) as string (or any other type).


#4

Do you try it with datatable?

Declare datatable and fill it with array values.
You can add rows or columns if you need it (on database).


#5

Yes, I also tried datatables, but also got no result.
This problem could be easily decided by switching off the “strict on” option, because I can declare an array and then initialize it like list_new=new int32(5,5){}
But because of "strict on"option I can’t write any value into it


#6

I did multidimensional arrays with two simple arrays and a database, and works great.

Please, post pics of your flowcharts.


#7

Java,
we can send examples of your work? This will greatly help


#8

I also need the solution for 2 dimenational array string ,i am not able to store the value if you know how to store it please let me know


#9

Attached is solution for Jagged Array incase if it supports your requirement.

jaggedArray.xaml (8.9 KB)