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 / SaveData and LoadData ...
Power Apps
Answered

SaveData and LoadData not giving any result

(0) ShareShare
ReportReport
Posted on by 73

In Power Apps application, users need to select a customer based on a dropdownbox.  Initially, I started putting this 'selected value' in a variable which works fine until the app is hardclosed.

Meanwhile, the value is being put in a collection, which actually works fine when checking the collections table.  And it modifies each time a different customer is selected.  That part is fine.

However, the SaveData and LoadData does not give me the expected outcome.

 

This is what it looks like :

In the OnSelect property of a button that needs to be pushed to continue, part of the code is 

MarcB1966_0-1696419418974.png

Both the variable and the Collection are "available" (but variable disappears when app is hard closed)

 

In the App "OnStart" property, the LoadData was embedded.

MarcB1966_2-1696419648505.png

 

In order to check if this works, I have added two textboxes to validate the result :

Textbox showing the variable

MarcB1966_3-1696419806386.png

 

Textbox 'picking up' the previously 'LoadedData'

MarcB1966_4-1696419891556.png

But not showing any results 😞

 

 

Tried this both on a mobile, as on the computer using the Microsoft PowerApp desktop version.  None of them works, which leads me to believe that the issue might not be within the cache functionality of the Iphone.

 

Any idea what I'm overlooking ?

 

Thx,

Marc

 

 

 

 

 

 

 

 

 

Categories:
I have the same question (0)
  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    In your example, "SavedSelectedCustomer" is the Name of the storage section being used by SaveData/LoadData - it is not directly readable into a text label and must be loaded into something else (which you have done by loading it into ColSelectedCustomer) - you will need your text label to show one of the properties of ColSelectedCustomer as ColSelectedCustomer is the thing being written to during the LoadData function.

     

    More info here:

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-savedata-loaddata 

     

    Cheers,

    Sancho

  • MarcB1966 Profile Picture
    73 on at

    @iAm_ManCat 

    Hello Sancho, 

     

    Thx for the additional insight.

    The purpose of the textlabel was intermediate, to allow me to check if the Save&LoadData functionality works.

    But - as you pointed out - it is unfortunately not directly readable into a textlabel.   

    However, using the 'ColSelectedCustomer' in the item property of a dropdown box actually works, with the expected outcome 🙂 

     

    In the end, I'm looking to "replace" the CustomerDropdown.SelectedText.Value in below code with the value stored in the ColSelectedCustomer.

    MarcB1966_0-1696505688570.png

    This should resolve the issue that when users hardclose their mobile app, the initial customer selection is lost.

     

    Any idea/suggestion as how I can get that ColSelectedCustomer text value embedded into the 'ServTimeRegistrFlow.Run ?

     

    Note : I've tried to use the 'default' property of that CustomerDropDown defined as "ColSelectedCustomer", but I guess the same issue as with text labels, as this did not result in the saved/loaded value.

     

    Much appreciated,

    Marc

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Heya,

     

    Ok, that's actually something I think we can do fairly easily - in your code you defined ColSelectedCustomer as:

    {CustomerCity: StatusCustomer}

     

    So, assuming StatusCustomer is a text status, then we can do something like this:

     

    ServTimeRegistrFlow.Run(
     User().FullName,
     "Stop TravelFROMHome",
     "",
     Location.Longitude,
     Location.Latitude,
     Now(),
     DailyID,
     "-",
     ColSelectedCustomer.CustomerCity,
     "SC_HomeStartStopIntervention"
    );

     

  • MarcB1966 Profile Picture
    73 on at

    Hello,

     

    @iAm_ManCat 

    Just tried out the above suggestion.  Results in the following error warning : " Invalid argument type (table).  Expecting a Text value instead" ... which probably means that the ColSelectedCustomer.CustomerCity is not considered a Text value.  Any way to 'translate' that into a textvalue ?

  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Yes indeed there is - you can use the First() function to get only the first row of the table, from which we can reference properties directly, like this:

     

    ServTimeRegistrFlow.Run(
     User().FullName,
     "Stop TravelFROMHome",
     "",
     Location.Longitude,
     Location.Latitude,
     Now(),
     DailyID,
     "-",
     First(ColSelectedCustomer).CustomerCity,
     "SC_HomeStartStopIntervention"
    );

     

  • Verified answer
    MarcB1966 Profile Picture
    73 on at

    Excellent stuff 🙂   Thx for your help ... it works.  

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 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard