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 

Yes, you definitely don't want to change the DataSource on that form.  Leave it was it was.  The Item should be glbSelectedItem.  If you put that in that form, do you get an error or other problem?

Tell me where we are now.  

Did you put this formula in the OnSuccess action of the EditForm?

Set(glbSelectedItem, Self.LastSubmit)

_____________________________________________________________________________________
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 

No Unfortunately the information in the "product detail" form does not go up correctly.
I have an error that says "Invalid formula, book value with "DATA SOURCE" is expected."

I specify that the "datasource" and my table excel "product".

test6.png

 

The only information that comes up, comes from the LOOKUP function.

test7.png

 

 


On the edit form, I always have the same problem, after registration I go back to the first product in the list.

 

test8.png
Sorry!

RandyHayes
Super User III
Super User III

@tuonoman 

Is the Datasource of all the forms PRODUCT?

Also, I was just looking at your Items property of the Gallery again and noticed there are two other added columns beside LineNumber.   We need to drop those as well for the form.

So for your Item property on the form, set to:

Set(glbSelectedItem; First(DropColumns(Table(ThisItem); "LineNumber"; "TAG_NAME"; "PROVIDER_NAME")));;  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!

View solution in original post

tuonoman
Helper IV
Helper IV

@RandyHayes 

There is something better,
The information goes back correctly on the detail sheet and on the product edition sheet. But during the validation of the modifications brought to the product, I still go back to the product id1

I made some captures

 

test9.png

 

test10.png

RandyHayes
Super User III
Super User III

@tuonoman 

I see you have the SubmitForm and setting the glbSelectedItem...that's all good, but how are you getting back to the DETAIL PRODUCT screen and what is the Item property on DetailForm1?  I assume this is the screen you are saying has then reverted back to 1.

_____________________________________________________________________________________
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 

 

The Item property on DetailForm1 is “glbSelectedItem”.
Yes when I register a product, I am redirected to an ID1 product screen.
like the previous video

 

Thanks for your help

RandyHayes
Super User III
Super User III

@tuonoman 

If your glbSelectedItem variable is being set in the OnSuccess of the EditForm, and your Detail form is based on that variable in the Item, then you should be seeing the proper record in the detail form.  Are you stating that this is not the case now?

_____________________________________________________________________________________
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

Hi @RandyHayes 

 

I wanted to apologize, I had some family problems.


I'm back on my power apps project, the "Set(glbSelectedItem," function has corrected my problems well and allows me to understand certain things.


Thank you very much for your precious help

RandyHayes
Super User III
Super User III

@tuonoman 

Excellent!  I am glad it is working now and I hope all is well on the family problems too.

 

_____________________________________________________________________________________
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

Yes thank you, children you better.
We nothing. Unbelievable!
Dirty Covid

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

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors
Users online (15,037)