The product doesn't have the freight option

Hello!

I made a Excel file and inside it there’s a column of URLs.
Accessing each URL and then taking the price of freight of each product, but there’s one that doesn’t have.

I’m trying to use a If activity, but I don’t really know what I’m supposed to write as condition??

Can someone help me?

Thanks guys!

Lets say that you are scraping the Price from the website.
You are putting that value to some variable.
You can check that variable like:

IF Variable=""

That will check if that variable has some value

1 Like

But if there isn’t even the option of putting, let’s say, my address so I can see how much the freight is, how can I put a variable to it?

Do I use the other products and use a Find element on the freight text box?

1 Like

Fine
i have a doubt on this statement
does it mean like you want to check whether there is URL in the column or you want to validate whether there price for the freight or not

Fine
–if you are trying to validate whether the excel file has value URL or not kindly follow the below steps
–use a excel application scope and pass the file path as input
–use a read range activity and get the output with a variable of type datatable named outdt
–use a for each row loop and pass the above variable as input
–inside the loop use a if condition like
String.IsNullOrEmpty(row(“yourURLcolumnname”).ToString)
if the above condition passes it will go to THEN part of if condition where we can leave it empty and if it fails that means if it has value in it, it will goto ELSE part where we can have any activity we want to get into URL and access other details

now if we want to validate whether the prices is value is empty or not
–before fetching value we can use Element Exists activity and check whether there is field available ornot
the output of the Element exists activity is boolean and name it out_boolean
now use a if condition like
out_boolean = True
if yes will go to THEN part where we can fetch the value or
if not will go to ELSE part where we can assign a common value like Null

hope this would help you’
Cheers @YuuK

1 Like

That’s exactly what I needed!!!

Thank you! :grin:

1 Like

Cheers @YuuK

2 Likes

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