cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (3,681)