Break a cycle do while


#1

I am using the activity do while, but I need to exit when a conditions is true, I haven’t found How can I do that?
for example

cont=1
do
if cont= 67 then
BoolRet=True
Exit do
end if

while cont<>1000


#2

Hi Lucky0906,

Please go through below link , this topic has already been discussed in forum.

Thanks
Bhanu Prakash L


#3

Change the while condition:

while (cont <> 1000 or cont <> 67)
do something

#4

Try this:

while not BoolRet


#5

I understand that I can break the while depending on my conditions. However, Imagine This.

You have to find a Row by its Id, but It is in a grid Which is variable and not It always has the same number of rows.

1 A
2 B
3 C
4 E
5 G

If I want to get the Row 3 C, Are you agree that I don’t need to continue into the do while because I found my row at the third iteration, for this reason I am looking for a activity that let me break the cycle with something like exit while


#6

Have you tried to set boolean variable when you find the row that you want?