In my flow, sometime there is no data, extract data from web, might appear error.
I want if error happen, and skip to special label station, it can be continue.
I have define a label, but is show no label?
why?
June I still have the same issue even with the PAD updated to the latest patch
seems that the bug still not fixed yet
Is this resolved? I am still facing the same issue.
A way to work around this is to copy the existing action to a text editor, modify the code, and then paste it back directly to the PAD designer. In case you are not aware of this, copying an action (or several actions) from PAD to a text editor will generate Robin code.
For example, here's a snippet of the Extract data from web page action that extracts two handpicked values and has an On error setting to Continue flow run.
WebAutomation.ExtractData.ExtractHandPickedValues BrowserInstance: Browser ExtractionParameters: {[$'''html > body > div:eq(2) > table > tbody > tr:eq(1) > td:eq(1) > table > tbody > tr > td > div:eq(0) > div > div:eq(4) > div:eq(0) > div:eq(1) > div:eq(0) > div:eq(1) > div > table > tbody > tr:eq(0) > td:eq(1) > div > div:eq(2)''', $'''Own Text''', $'''''', $'''Value #1'''], [$'''html > body > div:eq(2) > table > tbody > tr:eq(1) > td:eq(1) > table > tbody > tr > td > div:eq(0) > div > div:eq(4) > div:eq(0) > div:eq(1) > div:eq(4) > div:eq(1) > div > table > tbody > tr:eq(1) > td:eq(3) > span:eq(0)''', $'''Own Text''', $'''''', $'''Value #2''']} TimeoutInSeconds: 60 ExtractedData=> DataFromWebPage
ON ERROR
END
Here's the same action that goes to a label called NoData on error:
WebAutomation.ExtractData.ExtractHandPickedValues BrowserInstance: Browser ExtractionParameters: {[$'''html > body > div:eq(2) > table > tbody > tr:eq(1) > td:eq(1) > table > tbody > tr > td > div:eq(0) > div > div:eq(4) > div:eq(0) > div:eq(1) > div:eq(0) > div:eq(1) > div > table > tbody > tr:eq(0) > td:eq(1) > div > div:eq(2)''', $'''Own Text''', $'''''', $'''Value #1'''], [$'''html > body > div:eq(2) > table > tbody > tr:eq(1) > td:eq(1) > table > tbody > tr > td > div:eq(0) > div > div:eq(4) > div:eq(0) > div:eq(1) > div:eq(4) > div:eq(1) > div > table > tbody > tr:eq(1) > td:eq(3) > span:eq(0)''', $'''Own Text''', $'''''', $'''Value #2''']} TimeoutInSeconds: 60 ExtractedData=> DataFromWebPage
ON ERROR
GOTO NoData
END
So, if you modify the On error part of the action to contain GOTO {LabelName}, it will add the rule to the action. You can then paste an action like that back to your flow where you need it and it should work fine.
Still a workaround, but we generally do it this way.
A further alternative would be making the Extract data from web page action go to next action (not throw an error) and then adding a condition afterwards that checks if %DataFromWebPage% is empty. If it is, you can use Next loop to skip the current iteration and go to the next loop item. This would mean you do not need the label at all.
-------------------------------------------------------------------------
If I have answered your question, please mark it as the preferred solution.
If you like my response, please give it a Thumbs Up.
If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/
I had to put a label outside an if...then "loop" but I have to use another variable to save the value to execute again the if...then statement correctly :'(
This still isn't working properly when inside of a loop as of 3/10/23. I had to make numerous 'on block error' actions to determine where things were failing and needed to skip a bunch of actions after the failure.
I ended up creating the block error action and label outside of the loop, then moved them inside, and copied & pasted the block error action into Notepad and updated it there. Then copied & pasted it to the other variables I needed it to encompass. If you try editing the 'on block error' to make any changes, it won't let you save since the label will be missing again.
Hopefully this gets fixed at some point. Not really sure why it's so difficult a fix.
Version 2.27 (December 2022) and the bug is still present.
I tried @waynewu workaround. Is working beautifully and it looks even more elegant.
It should be marked as a second solution.
I have another potential workaround, as following
1. Place the goto action right below the label
2. Open the goto action, select the label, save the goto action, and save & close the goto action block
3. Drag the goto action to the correct place you want it to be
This works for me. Hope this helps
I tried to replicate the original example: a switch case inside of a for each, and I can't. The loops are always available for me. Try this:
Make your action and your Label Outside of the Loop, set up the error, and then move the actions into their appropriate places.
I already tried it, exactly thats the plan. If there is an error, GO TO LABEL. But sadly there is the problem it, can´t find the labels. I tried to Jumt to a label (cant be found) or to a subflow both options doesn´t work.
It seems label only works IN one loop, but not in the whole subflow/flow.
EDIT: Just to clarify because it was markted as solution. It is still a BUG! in my opinion. It has to be a solution that i can use a Label over the whole projekt, or at least in the same flow!
WarrenBelz
146,765
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional