Announcements
I have a form, OnSuccess a flow and a few patch functions are to be completed. Now i want to make sure that the form is closed only after these functions are performed. How can I make sure the form doesn't hide before these fucntions run.?
HI @rahulx81x ,
I am not sure what you mean by hide - it you put the Navigation at the end of the OnSuccess code, it will execute then. If this is an integrate Form, then the RequestHide() needs to go there.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
MVP (Business Applications) Visit my blog Practical Power Apps
Hi @rahulx81x ,
You can try the following function:
Syntax is
IfError( Submit(Form); Patch(); , Notify("Error Occured", NotificationType.Error, 1000); false; , Notify("Success", NotificationType.Success, 1000); UpdateContext({varShowForm: false}); true; );
Perform your operations you want like SubmitForm or Patch
Once all actions is successful, then only Form will close
Hope this helps
this works for patch functions, but if a flow is triggered, How do i ensure that the RequestHide() is executed only after the flow has run.
Let's say you triggered a flow using the App.
Then when the flow fails or succeeds, you need to pass the response back to PowerApp.
In your App,
You can do the following:
//I have considered passing response as string with output variable as 'FlowResponse' UpdateContext({ varFlowOutput: FlowName.run().FlowResponse }); If( varFlowOutput = "Success", //do this , //else do this );
@rahulx81x ,
You did not mention a Flow, but you could have at the end of it Respond to a Power App or flow and set a value to this (the ID will do called idreturn below) then
UpdateContext( { varID: YourFlowName.Run( ParametersHere ).idreturn } ); If( varID > 0, RequestHide() )
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 383 Super User 2026 Season 2
Mohsin Ali 356
WarrenBelz 232 Most Valuable Professional