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 App - LoadData...
Power Apps
Answered

Offline App - LoadData returns an error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I am trying to build a simple mechanism to my app to extend its use offline.

 

What I want to do: OnStart of the app, if there is connection, I want to save four tables to four different collections and then save those collections to my local cache. If there is no connection, I want to load those four tables into the collections.

 

What I have:

If(
// Check for connection
Connection.Connected,
// Connection - Save data to collections
ClearCollect(CollectionOne, TableOne);
ClearCollect(CollectionTwo, TableTwo);
ClearCollect(CollectionThree, TableThree);
ClearCollect(CollectionFour, TableFour);
// Save tables to local cache
SaveData(TableOne, "One");
SaveData(TableTwo, "Two");
SaveData(TableThree, "Three");
SaveData(TableFour, "Four"),
// No Connection - Retreive data from local cache & save in collections
LoadData(CollectionOne, "One", false);
LoadData(CollectionTwo, "Two", false);
LoadData(CollectionThree, "Three", false);
LoadData(CollectionFour, "Four", false);

);

 

What is happening:

I keep getting this error as if the name of the file does not exist: "There was a problem loading your data".

However, as you can see all names ("One", "Two", "Three", "Four") are matching. Is there something I am doing wrong when saving the data (SaveData)?

 

On a side note, the documentation for SaveData is not consistent/clear.

The online microsoft docs at https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-savedata-loaddata say: SaveData( Collection, Name ) - Collection - Required. Collection to be stored or loaded.

In Power Apps, SaveData( source, name) - Source: A table whose contents will be saved.

 

Thanks

Categories:
  • Verified answer
    GarethPrisk Profile Picture
    2,828 on at

    A couple if things to try, based on my experiences with offline apps.

     

    1. Your loading pattern is good, except you should save the Collection (not the source); outlined below
      • If Connected/Not-Metered/Etc
        • ClearCollect(collection, Source)
        • SaveData(collection, saveName)
      • Else
        • LoadData(collection, saveName)
    2. Run the app Connected the first time it runs, and (potentially) after publishing changes
    3. The app will only load data when running on a mobile device Power App's app; will not work in browser or Studio
    4. Be mindful of the size of the collections relative to the device's ability to process them (not usually an issue, but potential exists)
    5. It really shouldn't matter, but be a bit more descriptive in naming the saved data
      • Ex: "savedCollectionName"
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @GarethPrisk ,

     

    Thanks for the feedback.

     

    1. As I have said on this post, documentation is consistent so thank you for confirming SaveData's first parameter is the collection and not the source.
    2. Yes, so it correctly saves the update sources.
    3. Yes, testing has been done through mobile device.
    4. Now, for this part, I though that might be the issue since the collections are of a decent size; However, I tried the exact same process but with a collection containing only one record and it is still failing.
    5. The naming conventions in the post was for privacy reasons. 

    In all, after updating the source for the collection in SaveData, it works nicely.

  • D10ny5u532 Profile Picture
    53 on at

    @GarethPrisk did you find a solution to this. I see this thread is marked as good, however the answer says you are doing the right thing. This is a big problem for me.

  • GarethPrisk Profile Picture
    2,828 on at

    @D10ny5u532 what is your question exactly? The OP's issue was that they were trying to save the source (and not a collection), which was clarified.

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-savedata-loaddata

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard