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.
Solved! Go to Solution.
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)
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.
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.
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.
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?
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);
2. On the Sucess screen, the icon/button "OnSelect" property to
Navigate(BrowseScreen1, ScreenTransition.None)
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.
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)
That worked! Thanks!!!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
161 | |
91 | |
67 | |
63 | |
62 |
User | Count |
---|---|
216 | |
159 | |
96 | |
86 | |
79 |