Do While: Check if Number is still negative

Hey Guys,

I am getting a number via get Text from my Application and i want to use that number in my do While loop after every iteration to see if the number changed to Positive. I tried out lots of Datatypes and variants but it either says I got the wrong Datatype or it ignores my condition and continues with the loop even if the number already is positive. Please help!

ThxDoWhile_NumberCheck.xaml (12.0 KB)

If Condition = Variable.ToString.Contains("-")

Great Idea. But even after I implemented that it continues the iteration. Even though in the write line it cleary says it doesn’t contain “-” anymore.

can i see your workflow!

@SSchmitz When do you want the Loop to break?

Yeah Sure.
DoWhile_V2.xaml (11.1 KB)

I want it to break when the value of ‘Differenz_Betrag’ isn’t negative anymore. :slight_smile:
So the Click-activities after the “Write line” should be stopped

@SSchmitz I noticed there is a For Loop inside While, And the Scraping is happening inside it, hence inside for loop Use if to check if it is Non Negative , then use break if it is non negative , make sure you use it at the end of for

@supermanPunch Tried to understand it. But didnt quite get it :smiley: Could you illustrate that in an workflow?

DoWhile_NumberCheck.xaml (14.3 KB) This is your Workflow Updated with an if condition , Check if this is what you needed


Can you try the condition:

Convert.ToInt32(String) >= 0