cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AOZ
Helper III
Helper III

Using offline apps and collections

Good day,

I am creating multiple apps with offline functionalities (collections).

Each time i am saving data into the collection and changing app (opening another app), the saved data of the previous app disappears. 

Is there any solution to "save" on local device even if you are simultaneously using multiple apps?

The apps are to be used in environments where there are no internet connections - and at the end of the day, everything needs to be patched online.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

That is the way collections are designed to work.  They are local caches of data while the app is running. To save data when you close an app you need to store it somewhere.  If you are offline the only choice is using SaveData when you close the app and LoadData when you open it again.  The limitation on those is that they only work in the Mobile, IOS, or Android clients.  For a Windows laptop or tablet there is no way to Save and Load Data when working offline.  



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

View solution in original post

7 REPLIES 7
Pstork1
Dual Super User
Dual Super User

SaveData, LoadData, and Collections are all specific to an individual app.  I don't know of any way to share offline data between different apps on a device.



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

@AOZ ,

@Pstork1 is correct - I have already been down that track with two of my apps - you can use SaveData on two different apps using the same name for the data and both are individual data sets accessible only by the app that saved them.

Anonymous
Not applicable

@AOZ 

A possible 'solution' is to send data via the URL as a parameter. I've done this before but you are limited by the MAX length of the URL, which from memory is around 2000 chars.

 

If the data you want to share between apps is small, then this may work for you?

@WarrenBelz 

Maybe i did not explain correctly...i am not "sharing" any data between apps.

The thing is that when i close the app without patching (data still in collection), the data stored in the collection does not exist anymore...i lose them.

When i open the app again, i want to still see the collected data...

For example, i have:

APP1 - i store the data offline in the collection A

APP2 - i store the data offline in the collection B

when i switch from APP1 to APP2, collected data A disappears...

Pstork1
Dual Super User
Dual Super User

That is the way collections are designed to work.  They are local caches of data while the app is running. To save data when you close an app you need to store it somewhere.  If you are offline the only choice is using SaveData when you close the app and LoadData when you open it again.  The limitation on those is that they only work in the Mobile, IOS, or Android clients.  For a Windows laptop or tablet there is no way to Save and Load Data when working offline.  



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

@Pstork1 

Indeed, by using LoadData when app starts, this solves the issue of disappearing collected data.

 

Pstork1
Dual Super User
Dual Super User

You also need to make sure you use SaveData before closing the app.  Otherwise the LoadData won't get an accurate reload of the data.



-------------------------------------------------------------------------
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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,603)