Announcements
Hi all. I am quite new to powerapps, but hope you can help me out.
I am trying to build an app to log flight time. I have a button for take-off and one for landing and a field for each that notes the date and time for each button press. As I cannot have the app open at all times it sometimes shuts off and restarts. Then all my inputs and labels are empty when I restart the app. I would like to use collections to automatically save and reopen the inputs until I decide to delete them. I also have a drop down menu for departure and approach which I also want to be there on a restart.
Any help?
@egl002
If your app cannot tolerate an unexpected end of session, you will have to forgo using collections and variables and input the data directly into the datasource; ideally at the time the data is submitted.
You can call the SaveData function to store collections onto the local device. If the user were to restart the app, you could call LoadData in the OnStart property of the app to load the data.
The documentation here provides an example on how to call these functions.
https://learn.microsoft.com/en-gb/power-platform/power-fx/reference/function-savedata-loaddata
Hi, and thanks for the tip. I sort of succeeded in using the SaveData and LoadData:
But I cannot figure out how to make them reappear when the app opens. I tried the onappstart, but nothinghappens:
Is there something wrong with the above? Any other tips?
Thanks for everything so far.
Any tips on this?
You'd need to call SaveData to first save the collections.
SaveData(RotorTurning; "RotorTurning");; SaveData(RotorTurning2; "RotorTurning2");; SaveData(NVG; "NVG");; SaveData(NVG2; "NVG2");; SaveData(IFR; "IFR");; SaveData(IFR2; "IFR2")
Once you do the above, you can then load the data like so:
LoadData(RotorTurning; "RotorTurning");; LoadData(RotorTurning2; "RotorTurning2");; LoadData(NVG; "NVG");; LoadData(NVG2; "NVG2");; LoadData(IFR; "IFR");; LoadData(IFR2; "IFR2")
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 329 Most Valuable Professional
11manish 209 Super User 2026 Season 2
Mohsin Ali 179