Fine
in the while loop put only this condition Not string.IsNullOrWhiteSpace(VarNum)
and inside the loop use a IF condition like this VarNum.Contains(“TOTAL”)
If true it will get into THEN part or it will get into ELSE part
based onthe condition we can place the sequence within either of these parts, that we have now inside the while loop
I put the sequence inside the ELSE. Because IF VarNum = “TOTAL”, THEN sequence should end.
However, THEN is empty. And inside a WHILE loop. So if the cell is TOTAL, UiPath accesses the empty THEN part of the IF activity… and returns to the WHILE LOOP, because it still has not reached an empty cell (which is the pre-requisite to terminate the WHILE.
So, how do I get out of the WHEN activity . Is it possible that IF-THEN access some exit function??
ps: while I wrote the above sentence, I thought that maybe the IF-THEN could assign a blank value to VarNum, so when it reached the WHEN condition again, it exits the loop… I will try that.