Tag not monitored by Microsoft.
Post/ask on the Power Platform:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Team,
I am working on a Power Apps application and need clarification regarding dropdown value persistence behavior.
Requirement:
I have a dropdown control in the app. If a user selects a value (for example, 40), and later logs in from another system or device, the same selected value (40) should be displayed automatically.
Important Note: This needs to work without saving the selected value to any external API or backend database.
Could you please confirm:
Is this achievable using built-in Power Apps functionality only?
What is the recommended approach to persist the dropdown selection across sessions and devices without API integration?
Kindly guide me with the best possible solution or reference documentation.
Thank you.
Moved from Microsoft 365 and Office | Other
Tag not monitored by Microsoft.
Post/ask on the Power Platform:
To achieve the persistence of a dropdown selection across sessions and devices in Power Apps without using an external API or backend database, you can utilize the built-in SaveData() and LoadData() functions. These functions allow you to save data locally on the device, which can then be loaded when the app is restarted.
Here’s a recommended approach:
OnChange property of the dropdown control to save the selected value to a local collection. For example:
SaveData({SelectedValue: Dropdown1.Selected.Value}, "DropdownSelection")
OnStart property of the app, load the saved value when the app starts:
LoadData(LoadedData, "DropdownSelection", true)
If(!IsBlank(LoadedData.SelectedValue), Set(Dropdown1.Selected, LoadedData.SelectedValue))
Default property is set to the loaded value so that it displays the correct selection when the app is opened:
If(!IsBlank(LoadedData.SelectedValue), LoadedData.SelectedValue, Blank())
This method allows the dropdown selection to persist across sessions and devices as long as the app is used on the same device where the data was saved. However, note that SaveData() and LoadData() functions work in Power Apps Mobile but not in Power Apps Studio or the web player.
References: