cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sheetalbhatt
Helper I
Helper I

Data lost from screen when internet fluctuates

I have an app in which is loading a fair amount of data, and user inputs data into screens but sometimes app is not working when internet is coming in 10 sec going in 10 second so user feels like connecting the app and reconnecting the app. even the data are lost whatever they added so they are unable to work in such scenario.

 

I am already storing data offline but when User submit input then only data will be saved or else entered data lost when internet fluctuates.

5 REPLIES 5
Pstork1
Dual Super User III
Dual Super User III

When you say your are storing data offline I assume you mean LoadData and SaveData functionality.  But I suspect you are following the standard article on building an Offline app that uses a time to determine whether the App is online or not. I suspect that in your case the Internet fluctuates too much for that to be a viable option.  Instead I would modify your app to always run in Offline mode and then simply put something in the submit button that checks if the app is online and submits changes if it is and then goes back to Offline.  That way the data will always be stored in the collection and the collection will only be cleared if the app is online when you try to save.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi,

 

Thanks for this suggestion, i have few questions on that:

1. How to set app to always run in Offline mode?

2. How to put something in the submit button that checks if the app is online and submits changes if it is and then goes back to Offline?

 

 

Pstork1
Dual Super User III
Dual Super User III

1) The App is in Offline mode if everything you do runs against local collections instead of remote data sources.  The data sources load/refresh on demand IF a connection is available.  You can check the status of the connection using Connection.Connected, which will return true if the cloud is reachable.

2) Use an If() statement that tests Connection.Connected and submits the changes to the Cloud if its true, but leaves them in the local collection if they aren't.

 

Take a look at the following article.  It explains how to do an offline app.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/offline-apps



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi,

we already implemented this what you have suggested. the issue is Internet gets fluctuate very often lets say after every 5 second and due to that user is unable to work on form. whenever app gets reconnected whatever data user has added he just lost them.

 

how to manage such thing? is there any option where we can just set something so PowerApps itself wont try to connect internet again?

Pstork1
Dual Super User III
Dual Super User III

If all the work is done on offline collections then it won't matter to the user whether the internet fluctuates or not.  But sooner or later they need to save their work back to the cloud.  At that point the data goes from the local collection to the cloud and the user isn't working directly on that data anymore.  But if the Internet is always as unreliable as you say then you won't be able to use PowerApps.  Building an App to work Offline is so that you can continue to use the app where the Internet is unreliable until you get to a place where it is reliable.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,027)