Continue to next steps of the automation based on a value (Help)

Hello,

I need the bot to click on the download button only if the “Total paid out” is > 0. This report is downloaded from a website.

Please refer to the screenshot below.

How can I achieve this?

TIA!

Hi @Robot2_Automation

->Use an get text activity and get the value of the total paid out and store in a variable. Let’s take the variable as paidout( string data type)
->use and if condition and give the condition as

CDbl(paidout)>0

So as per the condition if the paid out value is greater than 0 then it will go to the then block so place the click activity in then sequence and indiacate the download button and keep the further steps in then sequence.

If the condition is not satisfied then it will go to else block so place the steps accordingly in the else block.

Regards

Hi @vrdabberu - Thank you for your response.

I tried this, However I got the below error.

Use Replace to get rid of the $

@postwick I tried but I’m getting the same error.

Then you didn’t do the replace correctly. The error is because you have characters besides numbers and period/comma in your string. Show us your code.

Hi @Robot2_Automation

Use the below syntax

CDbl(paidout.Replace("$","").Trim)>0

Regards

@vrdabberu This worked. Thank you so much for your assistance.

Best regards.

1 Like

You’re welcome @Robot2_Automation

Happy Automation !!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.