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??
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