To validate an Edit form I use an icon button with a "SubmitForm(EDIT_PRODUCT_FORM)" function.
After clicking on the button I am sent back to another product.
How can I be redirected after saving the modified values?
thanks for your help
Solved! Go to Solution.
No worries on the explanations, this is not uncommon when describing things about your app. You are much "closer" to it when you're working on it than anyone else.
Thanks for putting a video together on this. I can't see it though. It comes up as private and not viewable.
If a picture is worth a thousand words, what is a video of a thousand pictures worth? 😁
Thanks for the video. I reviewed it. And it still goes back to my original questions about the Item property.
You said your Item property was: LookUp(PRODUCT; ID_PRODUCT = LISTEPRODUCT.Selected.Label3_5.Text)
I was then asking, what is the Items property of LISTEPRODUCT?
AND, what is the formula on the Right Arrow Icon in your LISTEPRODUCT Gallery?
Yes i have the item property "LookUp(PRODUCT; ID_PRODUCT = LISTEPRODUCT.Selected.Label3_5.Text)" on the "EDIT_PRODUIT_FORM" of the "EDIT PRODUIT" screen and "DetailForm1" of the "DETAIL PRODUIT".
For the "LISTEPRODUCT" the item property is
and the Right Arrow Icon in your LISTEPRODUCT Gallery is
Hoping to have answered your questions
All but one...(and I did not ask it directly) - what is the OnSelect of the Gallery. You have Select(Parent) for your icon, so I need to know the OnSelect formula of the gallery (as it is the parent).
Okay, here is the analysis....
Your Formula for the Gallery items is considered "complex" to the Gallery. What does that mean? It just means that when you update a record that would be in that Gallery, PowerApps see the datasource change, and due to the extra evaluations that the Items needs to do, it then re-evaluates. When that occurs, the Gallery automatically goes back to record 1. This is exactly what you are seeing in your forms.
How to solve...
In your OnSelect of the Gallery, change the formula to the following:
Set(glbSelectedItem, ThisItem); Navigate('DETAIL PRODUIT', None)
Now, for all of your Forms, set the Item property to glbSelectedItem
Since your submit on the Edit form then takes the user back to the Detail form, the edits you just made will not appear. To solve that, in the OnSuccess action of the Edit form, put the following formula:
That should solve your issues.
Thank you for your help
I applied the formula "Set(glbSelectedItem;ThisItem);;Navigate('DETAIL PRODUCT'; None)" on onselect of the gallery.
I am now directed to the "'PRODUCT DETAIL'" screen.
But when I apply "glbSelectedItem" on the detail form I get an error.
Yeah, you're going to need to drop that LineNumber column that is added for the rows.
Change your OnSelect formula to the following:
Set(glbSelectedItem, First(DropColumns(Table(ThisItem), "LineNumber"))); Navigate('DETAIL PRODUIT', None)
I'm not sure I understand, should I delete the "LineNumber" column?
I applied your new formula, without erasing the line number column from the gallery.
But the information does not go back up in the product detail screen when I indicate " glbSelectedItem " in ITEM.
On the other hand, when I fill in "glbSelectedItem" in DATASOURCE, the information goes back up, but I have a icon that indicates that I am not connected to a data source.
Check out new user group experience and if you are a leader please create your group
Check out how to claim yours today!
Test your skills now with the Cloud Skill Challenge.
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks