Error BC30512 when building If Condition activity

Hi, I am running into a wall when I scrape a simple number from my own website and try to set up an IF CONDITION activity to test if 77.77 is greater than 40.
I repeatedly get the BC30512 error. I believe it’s because the output of the Get Text activity is of type UiElement instead of Number With Decimal. I don’t know how to change the variable type successfully.
Do you have any guidance to help me succeed with this simple activity? Thank you.

@Auz

Hey,

Put below mentioned query in If activity:

CDbl(str_OutputVariable.Trim)>CDbl(40)

Create your variable here:
In Output → Text,
image

Screenshot of Immediate panel:
image

Regards,
Ajay Mishr

1 Like

By default it’s of type String.

You don’t need to change the data type of the variable. You just require conversion in If Activity condition like this.

CDbl(strGetTextOutputVariable) > 40.00

image

Hope this helps to understand the logic here.

Thanks,
Ashok :slight_smile:

1 Like

Thank you for the help, Ashok!
Your advice eliminated the BC30512 error.
I still have a problem to solve. The IF Condition is not delivering a valid result. The automation scrapes the 77.77 value from my website and interprets it as a 0 (zero), and the IF Condition logs a message saying that the 77.77 is less than 40.
I added a log message step directly after the scrape so that the automation can show me that is scraped the number 77.77 but even though the automation runs successfully, it returns a null from the scrape log message instead of returning 77.77
What should I change in the scrape activity or the variable I put in the log message activity? Thank you.

@Auz,

Glad the earlier issue got fixed.
For the value not being scrapped, I think the selector is not captured correctly. Check one more time if the selectors are correct.

Also you can check extraction by using Preview Extraction option available at Get Text activity. Try it. If it’s not there, try to upgrade the package to latest version.

Preview

Thanks,
Ashok :slight_smile:

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