cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

Unreliable results with offline functionality (SaveData(), LoadData())

I'm testing an offline-capable app. The results are hit-and-miss.

Example1:

- After running SaveData() on a collection, IF I run an Exit() function OR close the app (iPhone home button, swipe up) OR turn the phone off, the local file seems to have rows in it, but no data is patched to my Data Source.

- The only way I can seem to Patch correctly is when I leave the app open, go to iPhone settings and turn off airplane mode. Then go back to the app without ever formally closing it.

Example2:

- Sometimes (can't find a pattern) when turning airplane mode ON (no connectivity), the list of apps in the PowerApps container app is empty. 

- Sometimes there are a couple listed, but not the one I want to test!

- Doesn't matter if I "Clear Cache", sign out/in, click "All Apps", search for the app... its gone when in airplane mode... this makes it very difficult to prove functionality. 

Has anyone else seen these symptoms or am I the only one?

Thank you

1 REPLY 1
Highlighted
Super User
Super User

Re: Unreliable results with offline functionality (SaveData(), LoadData())

Hi @ericonline 

I think Example2 looks like a long standing problem I had with the Windows Store App version of the PowerApp player (Apps not appearing when offline). AFAIK the problem was never resolved and now we simply advise clients that offline mode is not available for Windows devices. Perhaps the issue has now worked its way into the iOS version as well. 😞

I have an App using offline mode in active use but I think the users are all on Android (which seems to be working for the moment). If you pin the App to the homescreen while you are online does it then work to start the App when offline?

Example1 - in my offline-enabled App I have the user actively hit a button to perform the sync (button only visible if connected) which simply 'collects' from the Local Collection (re-populated whenever the App is opened using LoadData) into the datasource (for new records) or uses a ForAll to Patch modified records and Remove deleted records (I use a flag in the local collection to mark if something is new, modified or deleted).

Hope that makes sense - more info on the technique I use here: https://www.youtube.com/watch?v=ZAzZCh6hfbw&t=3s 

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,827)