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

Navigate to screen A if adding a record otherwise, Navigate to screen B

I want to navigate to a screen named Instructions after adding a record to a SharePoint list but want to navigate to the WelcomeScreen if editing the record.

 

I placed the following code in the OnSuccess property of the EditForm:

 

If(EditForm.Mode=FormMode.New,Navigate(Instructions,Cover),Navigate(WelcomeScreen,Cover))

 

But I never get the Instruction screen.

 

Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions

I had to change your scenario a little. (See the italized code below)

 

My Add icon OnSelect Property on the WelcomeScreen reads:

Set(NewForm,true);NewForm(EditForm);Navigate(EditScreen,Cover)

 

My Edit icon OnSelect Property on the ViewScreen reads:

Set(NewForm, false);EditForm(EditForm);Navigate(EditScreen,Cover)

 

My Save icon OnSelect Property on the EditScreen reads:

If(NewForm = true,SubmitForm(EditForm);Navigate(Instructions,Cover),SubmitForm(EditForm);Navigate(WelcomeScreen,Cover))

 

The OnSuccess icon on the EditScreen is set to false as you suggested.

 

This works.

 

View solution in original post

3 REPLIES 3
K-A-R-L
Solution Specialist
Solution Specialist

Hi @jwelborne ,

Can you add this code the AddNew Button OnSelect Property:

Set(NewForm, true);

Change the OnSuccess of your Form to: false

 

On the SubmitButton OnSelect Property in EditForm:

If(NewForm = true,SubmitForm(EditForm1);Navigate(InstructionsScreen,ScreenTransition.None),Navigate(WelcomeScreen,ScreenTransition.None))

----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you thought this post was helpful, please give it a Thumbs Up.

I had to change your scenario a little. (See the italized code below)

 

My Add icon OnSelect Property on the WelcomeScreen reads:

Set(NewForm,true);NewForm(EditForm);Navigate(EditScreen,Cover)

 

My Edit icon OnSelect Property on the ViewScreen reads:

Set(NewForm, false);EditForm(EditForm);Navigate(EditScreen,Cover)

 

My Save icon OnSelect Property on the EditScreen reads:

If(NewForm = true,SubmitForm(EditForm);Navigate(Instructions,Cover),SubmitForm(EditForm);Navigate(WelcomeScreen,Cover))

 

The OnSuccess icon on the EditScreen is set to false as you suggested.

 

This works.

 

K-A-R-L
Solution Specialist
Solution Specialist

Hi @jwelborne ,

Glad you had it working


----------------------------------------------------------------------------
Thanks,
K-A-R-L


If this post above helps, then please consider Accept it as the solution to help the other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,836)