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.

 

View solution in original post

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (42,976)