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

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
jwelborne
Level: Powered On

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

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
Level 10

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

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.

jwelborne
Level: Powered On

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

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

K-A-R-L
Level 10

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

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

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
Users online (4,744)