cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

What am I doing wrong with my OnSuccess property?

Hello all,

I have an app that submits a request.

Upon clicking the submit button the;

OnSelect =SubmitForm(EditRequestForm);

                  Refresh(GCProjectRequests);

                  Navigate(RequestAcceptScreen, ScreenTransition.Cover);

                  Reset(TextInputApproverCommentsApprove)

 

OnSuccess is meant to trigger a flow that = PMRequestsAPPROVEDSubmissions.Run(GalleryRequestList.Selected.ID, GalleryRequestList.Selected.Title, EditRequestForm.LastSubmit.ApproverComments, EditRequestForm.LastSubmit.ProjectLead.DisplayName, EditRequestForm.LastSubmit.ProjRequestorEmail, GalleryRequestList.Selected.Title, EditRequestForm.LastSubmit.ProjectRequestor, EditRequestForm.LastSubmit.ProjectApprover.DisplayName, EditRequestForm.LastSubmit.ApproverComments)

 

The user doesn't receive any notification that the OnSuccess properties don't run.

I will add that my "Submit" button is in a popup and not in the "EditRequestForm" or in the main part of the "EditRequestFormScreen". Does that matter?

2 REPLIES 2
Kudo Kingpin
Kudo Kingpin

It's possible the flow and the app have become 'disconnected'.

 

Things get a bit icky if you make too many changes after initially setting up the flow, and to fix it you have to remove the flow and add it back in again. But be aware that this will wipe your existing OnSelect code, so copy that somewhere to refer to when setting it back up.

 

That said, before you do that you should be able to see an error message if you edit the app and try to execute the flow yourself using the button in edit mode. You should also be able to look at the run history for the flow.

 

One thing to be aware of also is that if you call a Flow from within a PowerApp, it will attempt to run the flow using the credentials of the user of the app at that time - NOT the credentials saved in your flow.

Community Support
Community Support

Hi @tomgardzinski,

I don't find any syntax error with the formula typed within the OnSuccess property of the EditRequestForm?

Please consider take a try to put the PMRequestsAPPROVEDSubmissions.Run() function within the OnSelect property of the "Submit" button, then check if function works well:

SubmitForm(EditRequestForm);
Refresh(GCProjectRequests);
Navigate(RequestAcceptScreen, ScreenTransition.Cover);
Reset(TextInputApproverCommentsApprove);
PMRequestsAPPROVEDSubmissions.Run(GalleryRequestList.Selected.ID, GalleryRequestList.Selected.Title, EditRequestForm.LastSubmit.ApproverComments, EditRequestForm.LastSubmit.ProjectLead.DisplayName, EditRequestForm.LastSubmit.ProjRequestorEmail, GalleryRequestList.Selected.Title, EditRequestForm.LastSubmit.ProjectRequestor, EditRequestForm.LastSubmit.ProjectApprover.DisplayName, EditRequestForm.LastSubmit.ApproverComments)

In addition, please also check if you have created a valid connection from your app to your flow. Please consider take a try to re-create a new connection to your flow from your app, then try your formula agian, check if the issue is solved.

Please also make sure you have provided proper value for arguments of the PMRequestsAPPROVEDSubmissions.Run() function.

 

Best regards,

Kris

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

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (9,592)