web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Offline Sync Automation
Power Apps
Suggested Answer

Offline Sync Automation

(1) ShareShare
ReportReport
Posted on by 676
I have an app with the newer offline functionality built in (the globe icon), which automatically syncs the offline data with Dataverse when online. I have noticed, however, that if I make change in Dataverse with another app, the change is not immediately apparent in the offline-enabled app, even if it is online.
 
In my case, I have a dropdown menu with an OnSelect that clears a collection, then brings data into that collection from a Dataverse table.  Even after running this OnSelect, the cached/local data appears to stay in the collection, even though the device is online. To refresh the local tables with new data, I need to either re-start the app (not a good solution) or manually click the globe icon and select "Check for Updates."  After either of these, when the OnSelect runs, it properly updates the collection from Dataverse.
 
I am not sure, but I also think the sync between offline/online data occurs periodically but I am not sure how often. It also syncs when the device goes offline, then back online.
 
Is there any way to automate the sync process in this case, with code, vs. waiting for a sync, re-starting the app, or making the user tap the globe icon and "Check for Updates"?
 
Or, is this the way the process functions?
 
Thanks for any thoughts on this. Screenshot below (when user taps on globe icon).
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi @55552
     
    Can you try adding a Refresh(DataSource) to you app, in the space you are referencing so that it forces to go back to Dataverse, after you clear, but before you reload your collection?
     
    if this resolves your issue, please mark as such or please come back with questions.
  • 55552 Profile Picture
    676 on at
    @Michael E. Gernaey Good idea, but I did try that, and it did not have any effect.  I think this newer method of syncing offline data (vs. loaddata, savedata, etc.) is intended to be automatic and hands off. It generally works, but it is not always reflecting current data.

    More detail here may help. 
    LoadDataverse is a collection that is populated from the Dataverse table called LoadStatuses.
    varLoadStatus is a variable, set to hold the data from the Dataverse table.
    Maybe I put the Dataverse table Refresh statement in the wrong location. Should I try it at the arrow below? I had it Above the ClearCollect and Clear statements previously.

  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi @55552
     
    Aye, as I said 
    after you clear, but before you reload your collection?
     
    So I think we are in that spot ? but  yes it should be in between those
     
    It is... weird though that its not.. refreshing properly and auto uploading
     
    It just might be a bug too :-(
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
     
    users work exclusively with the data stored locally on their device, even when they're online.
     
    It takes a while for the data to synch so it would not be immediately apparent.
     
  • 55552 Profile Picture
    676 on at
    I inserted the Refresh(DataverseTable) after the clear but before collecting. This had no effect on the sync process.
    Does anyone know how often the sync occurs? I was watching the app once and saw the globe icon change symbols, indicating a sync, but I have not tried to see what the interval between syncs is.

    The only other option I can think of to sync data when the users need it is to add code in the dropdown menu (probably in the OnChange property) to Select the icon, which opens up the Sync Status menu. Then have a notification appear to prompt the user to Tap "Check for Updates" before closing the sync window.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard