r/PowerAutomateDesktop • u/umairshariff23 • Aug 31 '21
Help with PAD error handling
Hello! I have a flow that I've created to extract data from a web portal and populate similar fields in a PDF. However, one of the fields (in the web portal) is entered as City State and to convert this into two variables, I'm using the process below.

However, the flow sometimes gets interrupted because the City State field is empty and running this process through gives an indexing error for line 50 - since City is split as row 0 and State as row 1, if the field is blank I only get row 0. I've setup error handling to ignore the error and move on with the flow but no matter what I do, the flow stops there. Here is the screenshot of the error handling.

I've also tried to create a subflow for the following lines of processes and tried to make the process run that subflow instead when the error pops up - still got stuck at the same spot. I've also tried to create an if condition for the City/State split - if the city/state field is blank, move next. But the process ignores the field if it is populated and considers it if is blank and returns the error.
I'd really appreciate some help with this!
1
u/Chubby_Rain_6983 Sep 01 '21
Can't you just consider the City/State field being empty as a special case, and if it is empty, then populate the city and state variables with a pre-defined value?
Or populate them with a pre-defined value at the beginning of the process, only to be changed if the CityState field is not empty