cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Re: Refresh form data with new data after submit without leaving the form

Another comment, since I have spent an inordinate amount of time on this and I'd like to spare future users the same trouble... 

 

Phil, when I was working on this yesterday, I didn't quite understand your second solution so I just removed the global variable from my gallery OnSelect property and my edit form's Item property.

Well, wouldn't you know I ran into another problem today where I really needed that global variable in place. 

So, I came back to this. 

 

Turns out Phil's second solution is even better than the first (so extra kudos to you)! 

As usual, this most infuriating problem had a simple solution -- and the trick was just to find it. 

 

For anybody who runs into this problem later...
IF you are running into a problem where you submit a form but changes don't show up until you re-select the item from the gallery...
AND you are using a global variable instead of the default Gallery.Selected method of choosing and editing gallery records...
THEN the easy solution is to add a clause to your submit button, before the navigate property, wherein you update the value of the global variable (using SET). This basically elbows PowerApps and reminds it that when it goes back to the view screen, it should show you information from the updated global variable item. 

 

Easy peasy. 

 

For what it's worth, my solution was slightly different than what Phil wrote above. 

Instead of Phil's suggestion:

Set(Globalvariablename,Galleryname.Selected);

 

I put: 

Set(Globalvariablename,Editformname.LastSubmit);

 

Seems to be working fine now. 

 

Thanks for getting to this first, Phil!

Sooner703
Level: Powered On

Re: Refresh form data with new data after submit without leaving the form

Thank you all for the posting! Definitely helped me out! Smiley Happy

MVemba
Level: Power Up

Re: Refresh form data with new data after submit without leaving the form

I am having the same issue:
I update the edit screen, the data is updated on the SharePoint list, but the update does not show on the "detail" screen.
It only shows if I close the app and log in again.
john_dawson
Level: Powered On

Re: Refresh form data with new data after submit without leaving the form

I had the same, or similar problem; I got round it by putting an UpdateContext on the OnChange property of the field; I think maybe the problem occurs because I'm using an external value as the Default for the field, so I have to update its context on change, like this: UpdateContext({<name of external value>: <card value>.Text}) - if that makes sense? Was very simple to implement ...

Re: Refresh form data with new data after submit without leaving the form

I just solved this issue by adding this line to the EditDetails screen's OnVisible property:

Refresh('SP List Name')

View solution in original post

john4
Level: Powered On

Re: Refresh form data with new data after submit without leaving the form

Your solution worked great for me. I spent waaaaay to long trying to figure it out. Thanks again!

 

OnSelect: 

Set(Globalvariablename,Editformname.LastSubmit);
abcrandy
Level: Powered On

Re: Refresh form data with new data after submit without leaving the form

How would this work if I'm using a collection instead of a global variable?

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,785)