cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Using cache to remember dropdown selection

Hi All, 

 

Is it possible to have a dropdown with Items = Distinct(Checklists, Site)

and then work with a cache to set dropdown Default = First(SiteSelection).Site ?

 

I am trying to cache the selection a user made in a dropdown list - it is not working and I wonder if that's because I am defining a default value that refers to a different collection (SiteSelection) than what the items refers to (Checklists)?

 

This is what I have:

 

After the dropdown selection is made, the following formula is used when person proceeds (e.g. selects 'daily check'):

       ClearCollect(SiteSelection, {Site: drSite.Selected.Value});   // dropdown selection
       SaveData(SiteSelection, "Sitecache");

 

On the OnVisible property of this screen I have:

       LoadData(SiteSelection, "Sitecache", true)

 

Dropdown default is set to: Default = First(SiteSelection).Site

 

Capture.PNG

 

Thanks in advance! 🙂

 

 

5 REPLIES 5
Anonymous
Not applicable

Re: Using cache to remember dropdown selection

Can anyone spot why this may not work? 

 

I just tested this by creating a label that displays First(SiteSelectioin).Site and it shows nothing on a mobile device, so it seems this way of caching is not working.. 

 

Am I just using these commands in the wrong place, as the syntax appears to be correct? 

Sienna
Level 10

Re: Using cache to remember dropdown selection

As far as I can see, you are collectiong only one value.. you have to save the whole line of the database linked to your dropdown. What collumns have your database linked to your dropdown?
Sienna
Level 10

Re: Using cache to remember dropdown selection

Or filter your databse linked to your dropdown in default property using the collected value
Anonymous
Not applicable

Re: Using cache to remember dropdown selection

Hi Sienna, 

 

Essentially I collect that 1 value from the data base into a new collection 'SiteSelection'. Then I cache that to display that value as default.. 

 

Could you give me an example of what you mean? 

Sienna
Level 10

Re: Using cache to remember dropdown selection

If your database linked to your dropdown has multiple columns for example
ID Name
Then if you want your dropdown default work you have to tell him what line of the database should be selected in default property and not only one value. If you want first line to be selectet with value name you have to put in dropdown default
First(myLinkedDatabase)
In your scenario if you got only one value stored I would try to put in default property of dropdown
First(Filter(myLinkedDatabase,ColumnName=First(SavedCollectio).SavedValue)))

Im on my phone so exuse a misstakes

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,176)