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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Offline Power App

(0) ShareShare
ReportReport
Posted on by 4

Hi, I am trying to create an offline Power App. I have done everything seemingly correct but the SaveData and LoadData to iPad and iPhone does not work. I've looked through all the community forums but there seems to be no solution for me. The only thing I can find is that it was a bug in Power Apps but it is apparently fixed but it still does not work for me. Is it some kind of security setting somewhere blocking data to be written to the iPhone and iPad? You help is greatly appreciated...

 

The code:

All I am doing is:

On app startup, if the internet is connected, then I am saving a sharepoint list into a collection which I save then with SaveData to a file. On the next startup, if there is no connection, then I load from the saved file with LoadData into the collection but this collection is always empty! I do a rowcount and display it in a label. Here is the code

 

If(gSaveDataIsSupported,
If(gOnlineMode = false,
//False
LoadData(colCustomers,"OfflineCustomersFile",true),
LoadData(colStatusList,"OfflineStatusListFile",true);
//True
Concurrent(
ClearCollect(colCustomers,Filter(IPMCustomers,SalesGroup="QC6")),
ClearCollect(colStatusList,IPMStatusList)),
SaveData(colStatusList,"OfflineStatusListFile"),
SaveData(colCustomers,"OfflineCustomersFile");
),false);

 

Thanx...

Categories:
I have the same question (0)
  • BCLS776 Profile Picture
    8,994 Moderator on at

    Have you tried moving the SaveData() functions outside of the Concurrent() function? Your app performance should be unaffected if you make this change, and it helps ensure your collections are populated before trying to save them.

     

    Hope that helps,

    Bryan

  • nelde007 Profile Picture
    4 on at

    I did try it without Concurrent but it also did not work. I removed the third paramater "true" from the LoadData and I got the error that the file does not exist.

     

    This morning, I changed the commas and semicolons in the IF statement around and now it works!!! Weird, it did not complain when it was apperently wrong. Here is the new code:

     

    If(gSaveDataIsSupported,

    //true
    If(gOnlineMode,

    //true
    Concurrent(
    ClearCollect(colCustomers,Filter(IPMCustomers,SalesGroup="QC6")),
    ClearCollect(colStatusList,IPMStatusList));
    SaveData(colStatusList,"OfflineStatusListFile");
    SaveData(colCustomers,"OfflineCustomersFile"),

    //false
    LoadData(colCustomers,"OfflineCustomersFile",true);
    LoadData(colStatusList,"OfflineStatusListFile",true)
    )
    ,false)
    ;

     

    Thanx for your support. It is much appreciated...

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard