While loop exit

Hi All,

I am using while loop, when my condition true so, for exit, i am using break loop ,but its stop the bot or when i use break in for each so its showing error. so please let me know what can I use for exit from the while loop and move the future for the next step or next sequence.

Regards,
Meenakshi Sharma

1 Like

I tried to exit by assigning the value used in While condition to False .
While(val= true){
if(Condition)
{
Assign val= false
}

If your requirement is using while, then you must have certain condition to check and exit the loop. Else you can use another activity instead of while like IF. Can you please post the requirement you have?

not working

Can you share some sample XAML.

actually , what bot doing when the condition is true bot perform the task and then it repeat again and again same task .
i want when bot perform the task then it break and move for another sequnce.

Sequence.xaml (2.0 KB)

This is what while loop do exactly. So, you can do onething like, whenever you want to stop the bot and go to next steps, just make the condition true so that it will stop executing again.

try, but not working

Can you post the screenshots of what you tried as the sequence you attached is empty

you are giving or condition which will check both the conditions before the execution

Try giving only condition = true. Hope this works

i already try this, not worked

This is how you have use while loop. You have to make the condition to true when you want to exit the loop

image

ok got it… I am using condition true in loop may be that why , its run in loop .
thanks for the solution. now its working fine.

1 Like