cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

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
PaulD1
Community Champion
Community Champion

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,659)