cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Z_Mike1
Level: Powered On

Empty Collection

I have several collections that collect data but eventually they become empty.  Are collections only temporary storage?  If so, is there a local db I can set up for permanent storage?

 

Thanks.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Empty Collection

Hi @Z_Mike1 

Collections will become empty when a user closes out of your app. To persist the data in collections between sessions, you can save the collections onto the local device with the SaveData/LoadData functions.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-savedata-loaddata

View solution in original post

Community Support Team
Community Support Team

Re: Empty Collection

Hi @Z_Mike1 ,

Yeah. The Collection within PowerApps is a temporary storage. Collections are sometimes used to hold global variables or make a temporary copy of a data source. If you close your running app, the collection would be destroyed.

Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearc...

 

If you want to save your collection within your app permanently, as an alternative solution, I think the SaveData function and LoadData function could achieve your needs.

The SaveData function is used to save your collection into your local device, then when you re-open/re-run your app, you could use LoadData function to re-load this collection data.

The standard formula format of SaveData function as below:

SaveData( Collection, Name )

The standard formula format of LoadData function as below:

LoadData( Collection, Name [, IgnoreNonexistentFile ])

More details about SaveData and LoadData function, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-savedata-loaddata

 

Please also check and see if the following blog and video would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/savedata-and-loaddata-unleashed/

https://www.youtube.com/watch?v=j30xOM5OmRE

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Empty Collection

Hi @Z_Mike1 

Collections will become empty when a user closes out of your app. To persist the data in collections between sessions, you can save the collections onto the local device with the SaveData/LoadData functions.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-savedata-loaddata

View solution in original post

Community Support Team
Community Support Team

Re: Empty Collection

Hi @Z_Mike1 ,

Yeah. The Collection within PowerApps is a temporary storage. Collections are sometimes used to hold global variables or make a temporary copy of a data source. If you close your running app, the collection would be destroyed.

Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearc...

 

If you want to save your collection within your app permanently, as an alternative solution, I think the SaveData function and LoadData function could achieve your needs.

The SaveData function is used to save your collection into your local device, then when you re-open/re-run your app, you could use LoadData function to re-load this collection data.

The standard formula format of SaveData function as below:

SaveData( Collection, Name )

The standard formula format of LoadData function as below:

LoadData( Collection, Name [, IgnoreNonexistentFile ])

More details about SaveData and LoadData function, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-savedata-loaddata

 

Please also check and see if the following blog and video would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/savedata-and-loaddata-unleashed/

https://www.youtube.com/watch?v=j30xOM5OmRE

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Community Support Team
Community Support Team

Re: Empty Collection

Duplicated

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Z_Mike1
Level: Powered On

Re: Empty Collection

Thanks much for your help.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,159)