So I my scraping robot works but I purposly put a wrong link to see what happens in case of error and when it dosent find the object to be scraped its repeating the previous number.
Where did I give that order and how can I change it so it can leave that cell in blank or for example put a not found text.
(The most importan thing for me is to understand why te robot decided to repeat a previous number)
Then take an If condition activity after the assign activity then check PRRR variable contains any value.
In If condition give like this
PRRR.Any
In then block give the write cell activity and give the PRRR variable in what to write field.
In else block give the one more write cell activity just give “” double quotes in the what to write field. If there is no value in the variable it writes blank.
After every write cell activity place the assign activity and give PRRR = Nothing
Check the below workflow for your better understanding Email Process.zip (231.6 KB)
So I found the problem.
The problem is that in my flow chart when I Scrape the Price I Save it in to the variable “PR”. And for an example lets say the number is 5,5.
After that I use an Assign activity to adapt the number with no comas, and save that result in to “PRRR”. In this example PRRR is 55.
At this point “PR” keeps beeing 5,5.
Then I write in cell PRRR (55).
When we go to next row and the link is broken it has nothing to scrape, but the get text activity is configured to keep going on error. Since it scraped nothing, “PR” keeps beeing 5,5.
Then it goes to the Assign activity end transforms PR to PRRR.
Finally in write cell it repeats the number 55.
SOLUTION: After the Write Cell Activity, I use an Assign Activity that saves PR to the following value: “Could not Scrape”, so if next row it cant scrape the PR variable will be “Could not Scrape” and will write to cell “Could not Scrape” insted of previouse scraped number.