Hello,
We have implemented basic offline functionality into an app we are testing with the following OnStart function from the tutorials:
Set(Var,"N");
If(
Connection.Connected,
ClearCollect(xxxx,'xxxx'),
LoadData(xxxx,"xxxx",false)
);
SaveData(xxxx,"xxxx");
Set(Var,"Y")
Which works as expected and we can store records locally and submit them when reconnected. However we were running into an issue where the cache was not always saved. We were wanting to use the Set variable to display when the SaveData() had finished and the app was safe to close as our intended users will only use the app occasionally and frequently will start it up out of signal range and we wanted to be confident the cache was available so they would be able to use the app on site.
If I close the app and go offline as soon as the variable changes it never has the cache saved, but if I wait a further 10-20 seconds and do so it seems to save 100% of the time. Is there some way of instead checking if the SaveData() cache exists directly? At least a "if you go offline now you will be able to reopen the app again" since reopening PowerApps to an empty list is very frustrating. Given our users' situation we would like to be absolutely certain they will have access to the app out of signal.