Hi everyone,
I did not found anything related to this on the forum, I hope I did not miss it…
I’m working on the last UiPath Studio version (2019.1.0) and I try to insert numbers in a datatable in a way that my “1” is in row(1) column(1), my “2” is in row(2) column(2) etc., until 15. I assign my new line out of the loop, thinking it would work. Instead of the result I was expecting, each row has kept the numbers previously added in the one before, like this:
, , , , , , , , , , , , , ,
1, , , , , , , , , , , , , ,
1,2, , , , , , , , , , , , ,
1,2,3, , , , , , , , , , , ,
1,2,3,4, , , , , , , , , , ,
etc. (see Array-test1.xaml (10.8 KB) and Array-test2.xaml (10.7 KB) )
I’ve changed the assign, put it inside the loop, and now I have the result I wanted to:
, , , , , , , , , , , , , ,
1, , , , , , , , , , , , , ,
,2, , , , , , , , , , , , ,
, ,3, , , , , , , , , , , ,
, , ,4, , , , , , , , , , ,
etc. (see Array-test3.xaml (10.8 KB) )
Could anyone explain me why it works only when I put the assign inside the loop? In my mind, the two first trys seem good enough. Is it a bug or I’ve missed something?
Thanks a lot,
Jb