Hello everyone. I am new in UiPath. I have few questions. So, which activity can repeat activities within specified time range, and what type of constructs should i use to store undefined number of variables in the memory of the same type. I have watched and read all information that UiPath gives but can not find some.Please write something or just share useful links. Thank you.
I can think of below ways
- Replay event
- retry scope
- using a while loop
To add to what @vvaidya posted,
If you can detect how much time is passed then you can exit a loop after a time period. You can do this by storing current time before the loop, then assign current time during the loop and compare both values to a System.Timespan variable/value (i.e. 00:05:00 for 5 mins).
nowTime = Now
Assign looptime = Now
While (looptime - nowtime < timespan)
or with a Retry Scope you can set how many Retries instead pretty easily in the parameters, but is used mostly for Exception catches. For example, if you have an unstable website portal to log in to, you can Retry multiple times if the site fails on you.
To use a condition in Retry Scope do a search for “Expressions” or “Is” and use one of those, mainly “Is True”. You can use similar logic as a Do While with it if desired.
You could use stopwatch (System.Diognostics) instead.
Thank you! Can you please help me the second question - what type of constructs should use to store undefined number of variables in the memory of the same type.
You can store the variables in a List which has dynamic memory allocation.
Or a dictionary
Thank you very much!