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

How to navigate to the custom success screens only when SharePointForm1 is success.

Hi Guys..

 

I have a problem in the navigation on OnSave property of SharePointIntegration(when OOTB Save click) as well as in a custom button I have created as "Submit" OnSelect. When I click OOTB "Save" without filling required fields, the form immediately shows the validation messages on the form but suddently navigates to "Save Success" screen(I have created a separate screen for successful save). I want to navigate to the save success screen only after form is saved without any validation errors. Similarly in the case of custom button, I have given a navigation to another success screen says "Submitted successfully", but unable to control the validation success to navigate to another screen.

 

Please help me out to resolve this issue.

 

SharePointIntegration : OnSave I have given the formula as follows, but no luck it is not working..

SubmitForm(SharePointForm1); If(SharePointForm1.ErrorKind = None, Navigate(SaveSuccessScreen,ScreenTransition.Fade))

 

Similarly, in the custom button BtnSubmit : OnSelect, I have given the formula as follows..

SubmitForm(SharePointForm1); If(SharePointForm1.ErrorKind = None, Navigate(SubmitSuccessScreen,ScreenTransition.Fade))

 

Both above formulas are not working. Please advise..

1 ACCEPTED SOLUTION

Accepted Solutions
tchin-nin
Level 10

Re: How to navigate to the custom success screens only when SharePointForm1 is success.

You can set a variable and have different behavior according to this variable : 

 

SharePointIntegration.OnSave : Set(Submitvar,"OOTBbutton");SubmitForm(Form1)
CustomButton.OnSelect : Set(Submitvar,"Custombutton");SubmitForm(Form1)
Form1.OnSuccess : If(Submitvar="OOTBbutton",Navigate(Screen1,None),Submitvar="Custombutton",Navigate(Screen2,None),ResetForm(Form1);RequestHide())

 

Théo

View solution in original post

4 REPLIES 4
tchin-nin
Level 10

Re: How to navigate to the custom success screens only when SharePointForm1 is success.

Hi @dineshks

 

You can use the Navigate function on the OnSuccess property of the Form control.

 

Théo

dineshks
Level: Powered On

Re: How to navigate to the custom success screens only when SharePointForm1 is success.

Hi tchin-nin

 

Thanks..

 

Please advise how can I identify the two button clicks ie, One is from OOTB "Save" Click and another one is custom button "Submit" that I have placed in the form. I have to navigate to different screens when user click on "Save" and "Submit"

tchin-nin
Level 10

Re: How to navigate to the custom success screens only when SharePointForm1 is success.

You can set a variable and have different behavior according to this variable : 

 

SharePointIntegration.OnSave : Set(Submitvar,"OOTBbutton");SubmitForm(Form1)
CustomButton.OnSelect : Set(Submitvar,"Custombutton");SubmitForm(Form1)
Form1.OnSuccess : If(Submitvar="OOTBbutton",Navigate(Screen1,None),Submitvar="Custombutton",Navigate(Screen2,None),ResetForm(Form1);RequestHide())

 

Théo

View solution in original post

dineshks
Level: Powered On

Re: How to navigate to the custom success screens only when SharePointForm1 is success.

Awesome..Its worked..

 

Thank you...

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

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 (4,941)