Good day everyone - I have spent an unnecessarily long time during work hours trying find and solve this one bug - it’s metaphorically playing hide and seek with me.
No matter what I change - or test - or recreate from scratch - this same error shown in the bottom left of the following image keeps showing up.
And that’s not all - the activity actually finishes its job - it does everything it is meant to - and than makes the rest of the bot fail because of this error that occurs as soon as it has nothing left to find - I find this even more frustrating - because that means there shouldn’t even be a problem to begin with.
Put log messages to find the values of Find_Value and Replace_Value,Whether it contains your expected data or not.I mean Your Find_Value containing any Null values
I have used the Find/Replace activity in the exact same way within this exact bot - so why is it doing something different by assigning the Find and Replace Values as null? (I assume by reading empty cells that it should be ignoring). Inconsistent behaviour from an activity used in a consistent manner. This is one of the reasons this problem drives me up the wall (metaphorically).
This problem of mine is still not solved. And I found another factor why.
The UiPath bot I have made is being utterly - illogical. I rely on logic. Otherwise the problem can’t be solved.
This above image shows an error that I enforced by protecting a sheet that was never selected for editing in the 1st place. “Scraped_Data” sheet is the one I want edited. But the bot instead targets my CorrectionTab sheet (the one I protected). I tell the bot A - and the bot decides to do B.
I’m gonna mark this as a solution even though it has not been solved - so that this stupid problem doesn’t waste anyone else’s time.
Ok - I figured out an extremely basic way to avoid the issue of the bot reading empty cells and assigning the find and replace values as null.
You simply add a 3rd column next to the find and replace values (or just next to the find values etc) - and you give it all the exact same number, such as 1 or 2. (I’m going to go with 1)
Say the 3rd column’s name is “What can be used” etc
place an if statement around the Find/Replace activity as well as the activity that assigns the find and show variables (if you aren’t using the current row directly).
Within this if statement say something like: CurrentRow.ByField(“What can be used”) = 1
that way - as soon as it reaches rows without the 1 filled in, it stops reading further rows. (it should do this by default - but this solves the issue if the bot decides to be problematic.)