I’m trying to use “array” variable and “while” activity…
for (ary=0, ary.length <3 ,ary++ )
or in PHP
for ($ary=0, count($ary) <3 , $ary++ )
and I understand there id no “for” structure in Uipath but are do while or while.
How can I use array variables and while loop like above?
- Set “while activity”
- Set “variables” type “array” ary=[1,5,10]
- Set Open browser URL property “http//:xxxxx/?=”+ary←loop here
@ryoryo If you want to loop through the entire array you can use a ‘For Each’ activity. Otherwise you can either use a ‘While’ of ‘Do While’ activity and assign a counter inside it. Then use the counter as a condition for the activity. See attached workflow for examples
Loop.xaml (7.7 KB)
@ryoryo Check attached file
Main.xaml (8.0 KB)
Really thanks for your samples.It works!
but finally would you please how can i use type “System.string” or “System.int32” as,
i cant find it with “Browse for below” in drop down list.
Thanks for your comment.
I found it better to use “foreach” structure in Uipath.
and also thanks for your code shown, it works as well!
Hi @ryoryo, that stands for an array of string or an array of integers. In the browse list you should select ‘Array of [T]’, after which you are asked to the select the variable type for inside the array. There you can select int32, string, or any other type you want.