web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Collections, labels an...
Power Apps
Unanswered

Collections, labels and textinputs

(0) ShareShare
ReportReport
Posted on by 5

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?

Skjermbilde 2023-04-05 kl. 18.11.54.png
Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @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.  

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    @egl002 

    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

     

  • egl002 Profile Picture
    5 on at

    Hi, and thanks for the tip. I sort of succeeded in using the SaveData and LoadData:Skjermbilde 2023-04-10 kl. 07.28.17.png

     

    But I cannot figure out how to make them reappear when the app opens. I tried the onappstart, but nothinghappens:

     Skjermbilde 2023-04-10 kl. 07.28.55.png

    Is there something wrong with the above? Any other tips?

     

    Thanks for everything so far.

  • egl002 Profile Picture
    5 on at

    Any tips on this?

  • timl Profile Picture
    37,283 Super User 2026 Season 2 on at

    @egl002 

    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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard