Reset The Drop Down on Screen in Power Apps

Follow the below steps to learn how to reset, or unselect, a drop down control when the screen refreshes in Microsoft Power Apps. If this property is not set, when the app user navigates back to that screen the selected item will remain selected, and this could be confusing for the user. It works for drop down controls that hold a simple list or a data source.

Situation

As mentioned above, the natural behavior of a drop down control is to maintain its selection. If you navigate away from that screen and come back, your last selection is still visible. In many cases, this may not be an issue, but for one project, I needed the drop down control to refresh each time the screen was visible (loaded) to the app user.

PowerApps-Dropdown

Default behavior for screen is to select the top item which is “Start With This Entity…”

PowerApps-Dropdown

Displaying some of the items in the drop down control list.

PowerApps-Dropdown

Selected Business.

PowerApps-Dropdown

Selecting Business and then clicking the Go button will take the app user to a different screen.

PowerApps-Dropdown

Navigating back to the Main screen would still show Business selected in the list. I do not want that.

Insert Screen

With your Canvas App open, click Insert, and then choose your desired Screen layout.

PowerApps-Dropdown

Insert Drop Down

Select somewhere on the new Screen, and click Insert, and then choose Drop down for Input.

PowerApps-Dropdown

With the new Drop down control selected, ensure Items is selected in the properties list, and enter your list of items in the formula bar area.

Here is the code I used:

[
“Start With This Entity…”,
“Business”,
“Contact”,
“Licence Application”,
“Licence Detail”,
“Renewal”,
“Order”,
“Order Product”
]

Screen On Visible – Drop Down Reset

In the left navigation, click the Screen that holds the Drop down control. Select the On Visible property and enter Reset function in the formula bar. Ensure to name the Drop down control correctly.

Formula I used: Reset(ddlMain)

PowerApps-Dropdown

It would be easy to make the mistake of thinking that Refresh would perform the same action, but it does not. Refresh is for data sources, and that only refreshes the list; it does not reset the Drop down control to its default value.

Go ahead and save and then run the Canvas App. Now when you select an item from the list, navigate away from that screen and come back, the default item will be selected.

If you have questions about using Microsoft Power Apps, please contact us.

Which Dynamics Product Is Best for You?

Answer some basic questions about your company and your requirements, and find out what products would fit your business.

Take Our Quiz

Which Dynamics Product Is Best for You?

Take Our Quiz