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.
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.
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:
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:
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.
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.
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.
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights