Forum Discussion
Allan_Clarke
Jul 05, 2018Iron Contributor
Simple Power App using a Collection
Thought I'd try to build a simple app to store data to a "Collection" and used Shane @ Bold Zebras video on YouTube at https://www.youtube.com/watch?v=yS6mTRlmuls as a guide. Followed to the letter (...
- Jul 06, 2018
Hi Allan_Clarke,
As you mention: A collection is not meant to save data beyond the session you're on, but is a temporary data set you can use during the session. So every time you open the app the collection starts all over.
Data added to the collection during the use of the app will remain there until you remove it from the collection or close the app.
You can repopulate a collection using a formula on start of an app, but that will just populate it with exactly the same data every time you start it.
If you want to save data beyond the session of an app you will need to connect a data source. That could be an Excel on your OneDrive, a list in SharePoint, a SQL database or Dynamics CE, you name it.
Rebekka Aalbers-de Jong
Iron Contributor
In the mean time I learned something myself. You can use the SaveData/LoadData functions to store collected data locally on a device for reuse beyond the current session of the app. It only works in combination with the PowerApps app, so not in the browser. And only on the device where the data is stored.
More information about these functions in this article: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-savedata-loaddata
More information about these functions in this article: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-savedata-loaddata
Allan_Clarke
Aug 08, 2018Iron Contributor
Nice one, thanks for the heads up.