cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tuonoman
Helper IV
Helper IV

redirected after saving edit form

Hi

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

39 REPLIES 39
RandyHayes
Super User III
Super User III

@tuonoman 

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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
tuonoman
Helper IV
Helper IV

@RandyHayes 

oh  sorry i changing the setting visibility of the video.

 

 

RandyHayes
Super User III
Super User III

@tuonoman 

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?

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
tuonoman
Helper IV
Helper IV

@RandyHayes 

 

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 

 

Items listeproduct.png

  and the Right Arrow Icon in your LISTEPRODUCT Gallery is

 

Items listeproduct2.png

 

Hoping to have answered your questions

RandyHayes
Super User III
Super User III

@tuonoman 

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).

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
tuonoman
Helper IV
Helper IV

@RandyHayes 

 

@RandyHayes 

 

Ok i understand

 

oneselect liste product.png

RandyHayes
Super User III
Super User III

@tuonoman 

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:

Set(glbSelectedItem, Self.LastSubmit)

 

That should solve your issues.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
tuonoman
Helper IV
Helper IV

 

@RandyHayes 

 

Thank you for your help
I applied the formula "Set(glbSelectedItem;ThisItem);;Navigate('DETAIL PRODUCT'; None)" on onselect of the gallery.

 

test2.png
I am now directed to the "'PRODUCT DETAIL'" screen.

But when I apply "glbSelectedItem" on the detail form I get an error.

 

test4.png

RandyHayes
Super User III
Super User III

@tuonoman 

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)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
tuonoman
Helper IV
Helper IV

@RandyHayes 

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.

 

test5.png

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 (43,463)