
I am running a RPA that opens a SQL connection and runs a SQL statement (based on two parameters that are already in an excel file), and then it writes the results on a specific excel column. My problem is that Im not going to be the person that fills the two parameters in the excel file, and I was trying to see what errors the RPA would return if one of these parameters were wrong. I was trying to use the "On Error" action, to go to the next action that is a "Increase a variable" if an error happens.
I changed the two parameters to something the SQL statement would never find in the database, and modify the action to "write to excel" to "On Error" to to next action, but the RPA still stops the flow because of this error:
This is my flow:
Write to Excel:
On error:
Query Result (After the SQL statement):
I want that if there is this error to go to the next action and continue with the flow.
Use an On block error action and put the relevant actions you want to handle inside the block. Then enable the "Handle unexpected logic errors" toggle in the parameters of the On block error action. This is the only way to handle the index out of range error.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.
I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.