cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ms-PowerRanger2
Helper I
Helper I

Navigate to Prior Screen from Successfully Save Screen

My App goes to a success screen upon saving a record.  From the success screen, I'd like to give the option to go back to the previous screen where the record exist if the user wants to re-edit or add something else.

 

I tried adding a back button and specifying the following OnSelect

 

Navigate(EditScreen1,Fade,Form1.LastSubmit) 

 

But it doesn't work.

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Community Champion
Community Champion

Hi @Ms-PowerRanger2 

The reason is on the edit screen, the form Item property needs to be updated. Looks like the current setup for the Item property is BrowseGallery.selected. This is what main change needs to happen.

 

For this change, we have to use the same variable when you select the item from the Gallery and store the New ID when it's created.

 

Steps:

1. "OnSelect" of the browse gallery to 

 

 

Select(Parent);Set(SelectedId,BrowseGallery1.Selected.ID)

 

 

2. On EditScreen, Set Form "OnSuccess" property to 

 

 

Set(
    SelectedID,
    EditForm1.LastSubmit.ID
);
Navigate(
    SucessScreen,
    ScreenTransition.Fade
);

 

 

 

3. On Edit Screen, Form "Item" property to

 

 

LookUp(IssueTracker, ID=SelectedId)

 

4. On the Success screen, set "OnSelect" navigation to icon/button

 

Navigate(EditScreen1, ScreenTransition.None)

 

 

View solution in original post

8 REPLIES 8
RandyHayes
Super User
Super User

@Ms-PowerRanger2 

I am not sure of what you are aiming at with the Form1.LastSubmit in your function.

The formula should be: Navigate(EditScreen1,Fade)  or simply Back()

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Either with or without the optional 3 parameter, It doesn't appear to work when I do the following...

 

Add New Record > Save Record > Land on Saved Successfully Screen > Navigate to EditScreen

 

This will show the last record that I edited but not the new record I just successfully saved. 

 

Either option will work for me if I just choose to save a record that already existed and want to go back to edit the record from the saved successful screen.

 

 

RandyHayes
Super User
Super User

@Ms-PowerRanger2 

What is the Item property of the form?

If it is a variable, then you can update the variable in the OnSuccess action of the form. i.e.  Set(yourVar, Self.LastSubmit)  then it will be the last submitted record.

But, this is a guess without knowing your Item property on the form and your OnSuccess action formula.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Hi RandyHayes, Thanks for insight.  I'm not sure I'm implementing your suggestion correctly. 

 

My Item Property is currently set to Gallery1.Item.  Are you saying to just set OnSuccess to Set(mySavedRecordVar, Self.LastSubmit)  and just reference the variable with the back arrow on the success screen?  Do I need to do something different with the Item property?

StalinPonnusamy
Community Champion
Community Champion

Hi @Ms-PowerRanger2 

 

We are discussing just navigation. So as @RandyHayes mentioned no need to use Form1.LastSubmit.

 

1. In Edit Screen, set Form "OnSuccess" property to 

 

Navigate(SucessScreen,ScreenTransition.Fade);

 

 

StalinPonnusamy_0-1628386831199.png

2. On the Sucess screen, the icon/button "OnSelect" property to

 

Navigate(BrowseScreen1, ScreenTransition.None)

 

StalinPonnusamy_1-1628386992124.png

 

It won't work for me.  I'm going back to an edit screen (Not sure if that makes a difference) ... Navigate(EditScreen1, Fade)... It never shows the record I just saved rather It seems to show the record I saved prior to that one.

StalinPonnusamy
Community Champion
Community Champion

Hi @Ms-PowerRanger2 

The reason is on the edit screen, the form Item property needs to be updated. Looks like the current setup for the Item property is BrowseGallery.selected. This is what main change needs to happen.

 

For this change, we have to use the same variable when you select the item from the Gallery and store the New ID when it's created.

 

Steps:

1. "OnSelect" of the browse gallery to 

 

 

Select(Parent);Set(SelectedId,BrowseGallery1.Selected.ID)

 

 

2. On EditScreen, Set Form "OnSuccess" property to 

 

 

Set(
    SelectedID,
    EditForm1.LastSubmit.ID
);
Navigate(
    SucessScreen,
    ScreenTransition.Fade
);

 

 

 

3. On Edit Screen, Form "Item" property to

 

 

LookUp(IssueTracker, ID=SelectedId)

 

4. On the Success screen, set "OnSelect" navigation to icon/button

 

Navigate(EditScreen1, ScreenTransition.None)

 

 

View solution in original post

That worked!  Thanks!!!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,119)