Use of SPAN, generic value, and If statement

Hello all,

I am using screen scraping to scrape an area on a website. The variable is a GenericValue variable called SPAN and it’s output looks something like this : USD 177.73. This is just an example. I am parsing off the **USD ** which leaves 177.73 for example.

Next I am using an If statement and if the value is greater than 200 I am using a move file activity to rename the file from 1234.pdf to 1234+200.pdf. The problem I’m having is that the If seems to change the file name regardless of what the value is. What am I doing wrong? Do I need to convert the generic value variable to an integer first?

Thank you in advance

@mworth123

Yes. Change variable type of screen scraping to String from Generic value. And then mention below condition in IF statement.

         IF Cdbl(varScrapeValue) > Cdbl(200)
         Then use Move file blah blah
          Else Nothing.

@Lakshman - Thank you!

1 Like

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