cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Updating data to Sharepoint, but Powerapps still pulling the old data.

I have a situation where I'm saving data to a sharepoint table through UpdateIf and it is working correctly on the back end.  I can literraly see the data saved to sharepoint.

 

The problem is that the table in powerapps doesn't refresh before it pulls the next query of that newly saved data.  And the refresh() function doesn't do anything to alleviate this.

 

If I click the button twice to run the collect() action, it pulls on the second go... but click only once and it loads the old data that literally doesnt exist any more on the table.  The collect function is pulling from the sharepoint table and no where else but obviously it must be cached or something to pull the wrong data. 

 

Time doesn't help.  It seems to only update after being asked to collect it twice.

 

You can see where staff are confused as hell as they have to load something twice... 

 

 

Please let me know if you have any ideas on how to fix this sync issue.

 

Thanks,

-Kevin

4 REPLIES 4
Highlighted
Super User
Super User

Sometimes you have to add in a manual Refresh(). If I have as screen that has the form and the gallery on the same screen I usually put that in where after they do the SubmitForm() I have a Refresh(). 

 

Just keep in mind that if you are using collections on the screen anytime you do a Refresh() you will also need to refresh your collection data or it will still be stuck showing what you originally asked for. 

Highlighted
Community Support
Community Support

Hi @kscharber ,

Do you add a Data Table control in your app to list all records from your SP list?

Do you add a colelction based on your SP List data source in your app? Do you connect the Data Table to the collection?

 

I have made a test on my side, and don't have the issue that you mentioned. Please consider take a try with the following workaround:

Set the OnStart property of App to following:

ClearCollect(RecordsCollection, 'YourSPList')

Set the OnSelect property of the "Submit" button to following:

UpdateIf(...);
Refresh('YourSPList');    /* <-- Add formula here */
ClearCollect(RecordsCollection, 'YourSPList')    /* <-- Add formula here */

Set the Items property of the Data Table to following:

RecordsCollection

Please consider take a try with above solution, then re-load your app (fire the OnStart property of App), check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Still no luck, as mentioned I've tried adding refresh, and I've tried using collections.  The delay still occurs when pulling from the data table.

 

Even if a collection worked, wouldnt this still mean that other staff are not loading the correct data at the right time?  This is confusing.

 

-Kevin

Highlighted

Hi @kscharber ,

Have you taken a try to refresh your data source, then re-collect data from your SP List into the collection in your app?

 

Currently, I could not reprocuce your issue on my side, and don't have the issue that you mentioned. Please consider turn off the "Improved app rendering (final validation)" option and "Enable improved data table control slection and Value property"within Advanced settings of App settings of your app, then re-add a Data Table control within your app, try above formula again, check if the issue is solved.

 

If the issue still exists, please consider re-create a new app based on your data source, then try above formula again, check if the issue still exists.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,995)