I have a simple counter stored in a variable: Set(varCounter;varCounter+1)
If i quit my application my variable is lost.
How can i store my variable and retrieve it at the launch of my app?
Many thanks all for your replies. I don't have a premium license. I think i will use instead a sharepoint list to store and retrieve the information needed.
Yes, you can use an environment variable, but that will require a Premium license.
Hi @Sormick ,
Since it's a single number, I think you can leverage an environment variable to save the value. You can load/get the value OnStart of your App, it supports update using Patch function as well.
Please refer to below video:
Canvas Apps: Using Environment Variables - YouTube
and find related formula in below threads:
Solved: How to read Environment Variables in PowerApp? - Power Platform Community (microsoft.com)
Best regards,
There is nothing like a permanent variable or a special formula. But yes, as I mentioned you can store the number in a data source like SharePoint. I mentioned LoadData and SaveData because they are easier to use for something like storing one number, if you can live with the limitations. Otherwise use SharePoint.
First of all, happy new year and thank you for your reply. Can we store the counter number in a sharepoint list instead? or a permanent variable or a special formula? i only need to store one number and when i click on a button it increments "+1" to that number and store it again.
To do that you'll need to use some kind of data source like SharePoint or store it and load it using SaveData and LoadData. The one problem with SaveData/LoadData is that its not supported on all platforms. Its primarily meant for use on mobile devices.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.