cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tomgardzinski
Level: Powered On

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
davidstone
Level 8

Re: What am I doing wrong with my OnSuccess property?

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 Team
Community Support Team

Re: What am I doing wrong with my OnSuccess property?

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
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,353)