cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

Error Handling - Scope - Initiate Variable

Hello Community,

 

I just learned about using Scope to group actions together then use Apply to each  in the next Scope to check error handling. However, I am running into a problem since Initiate Variable cannot be place into Scope.

 

I have many Initiate Variable in the Flow since I have to use replace function to convert strings (to JSON friendly string) so it won't break the Flow when it gets to the parse JSON. 

 

Beside having many parallel actions in each "Initiate Variable" to make sure each convert string does not fail, is there anyway to have error handling for all the "Initiate Variables" I have in the Flow?

 

Thank you for your help!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Error Handling - Scope - Initiate Variable

Hi @lliu_western ,

 

Could you please share a screenshot of the configuration of your flow?

As you said, we couldn't initial a variable in the Scope action, if you want to convert a string inside the Scope, could you please take a try to use the Compose action to save the string instead of initial variable action.

1.png

 

Please take a try and let me know if the issue could be solved.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Community Support
Community Support

Re: Error Handling - Scope - Initiate Variable

Hi @lliu_western ,

 

Could you please share a screenshot of the configuration of your flow?

As you said, we couldn't initial a variable in the Scope action, if you want to convert a string inside the Scope, could you please take a try to use the Compose action to save the string instead of initial variable action.

1.png

 

Please take a try and let me know if the issue could be solved.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Super User
Super User

Re: Error Handling - Scope - Initiate Variable

Hi @lliu_western 

As part of the flow logic, 'Initialize Variable' action has to be declared outside the scope action. Only the 'Set or Append or Data' action to be inside the scope action.

 

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue

-Sudharsan K...

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...
Highlighted
Resolver II
Resolver II

Re: Error Handling - Scope - Initiate Variable

@v-alzhan-msft   Thank you. I took your advise and changed it to Compose Date after. 

 

But I got a problem of getting two notification e-mail when Flow fail. 

 

Please see the screenshot of the flow below:

 

How can I turn off the "Fail - talking to API" notification off if it's already fail in the "Fail - Converting Variable" level?

 

 
Highlighted
Resolver II
Resolver II

Re: Error Handling - Scope - Initiate Variable

For some reasons, the screenshot did not get attached. Flow.PNG

Highlighted
Resolver II
Resolver II

Re: Error Handling - Scope - Initiate Variable

I think I know what to change now. I re-configure the "Configure run after" and I unchecked the "is skipped". 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (7,355)