While working with the Power Apps combo box control, we might need to reset this control to undo the selection that we have made. We can reset a Power Apps Combo box to any default value or empty value.
In this article, I will show you how to reset Power Apps combo box control using different scenarios.
Reset Power Apps Combo Box Control
Here, I have a Power Apps combo box control containing leave types such as Sick Leave, Vacation Leave, etc.
There is a Reset icon outside of the combo box. Once the user clicks on the Reset icon, the combo box will reset, as shown below.
Follow the steps below to achieve this!
1. Add a Power Apps combo box control from the +Insert tab. Then, provide the array below in its Items property.
["Sick Leave","Vacation Leave","Marriage Leave","Compensatory Leaves","Half-day leave","Casual leave"]
2. Add a Reset icon from the +Insert tab in Power Apps and provide the formula below in its OnSelect property.
Reset(cmb_leaves)
Here, cmb_leaves is the combo box control name. This Reset function will reset the combo box control.
Now, save and publish the changes. While previewing, you can see the combo box control will be reset when you click on the reset icon.
With the same Power Apps Reset function, we can also reset multiple selections in the combo box control. Look at the example below,
This way, we can reset the Power Apps combo box control.
Reset Power Apps Combo Box to Default Value
Here, we’ll see how to reset the Power Apps combo box to its default value. In the example below, the combo box has one employee name as a default value, so after selecting the other employee name, if I click on the reset icon, it resets to its default employee name.
Follow the steps below to achieve this!
1. Add a Power Apps Combo box control from the +Insert tab. Then, provide the formula below in its Items property to get the employees’ names into the combo box from the SharePoint list.
'Customer Contacts list'.Title
Here,
- Customer Contacts list = SharePoint list name.
- Title= This column contains employees names.
2. Set the Power Apps combo box default value to one of its values, like in the image below.
["Toby"]
3. Add a Reset icon from the +Insert tab and provide the formula below on its OnSelect property.
Reset(cmb_emp)
Here, cmb_emp is the combo box control name.
Save the changes and preview the app once. Then, select an option in the Power Apps combo box and click the reset icon, it will be reset to its default value.
Reset Combo Box Within Power Apps Gallery
In this section, I will explain how to reset the Power Apps combo box control within the gallery. In the example below, while I’m clicking the reset icon, the combo box control is reset to its default value in the gallery.
Here is the SharePoint list named Employee Leave Request, which I used for the above Power Apps gallery. I took this Leave Type choice column for the combo box control in the gallery.
To achieve this, follow the steps.
1. In the Power Apps gallery, Add a Combo box control from the +Insert tab. To get the choice values into it provide the below formula in its Items property.
Distinct('Employee Leave Request','Leave Type')
Here,
- Employee Leave Request =SharePoint list name.
- Leave Type = Choice column name.
The Distinct function will fetch the values present in the choice column to combo box control.
2. To get the assigned leave type for each item, provide the formula below in the DefaultSelectedItems property of the Power Apps combo box control.
ThisItem.'Leave Type'
3. Add a Reset icon within the Power Apps gallery. Then, provide the formula below in its OnSelect property.
Reset(cmb_leavetype)
Here, cmb_leavetype is the combo box control name.
Now, save the changes and preview the app. You can see that when you select another option in the combo box control, it will reset to its default value when you click the reset icon within the gallery.
Reset Power Apps Combo Box to Blank
Let’s see how to reset the Power Apps combo box to blank. Here, I have a combo box control with Leave types. After selecting an item in the combo box, if I click on the reset icon, the combo box control is reset to blank.
Follow the steps below to achieve this!
1. In the Power Apps combo box control, provide the below blank value in its DefaultSelectedItems property.
[" "]
So, by default, the blank value will displayed in the Power Apps combo box control.
2. Add a Reset icon and provide the formula below in its OnSelect property.
Reset(cmb_leaves)
Here, cmb_leaves is the combo box control name.
3. Save the changes and preview the app. Then, you can see while clicking the rest icon after selection in the combo box control; it will reset back to blank.
This way, we can reset the power apps combo box control to blank.
I hope you understand how to reset the Power Apps combo box control. Here, I have explained how to reset it to its default value and blank, reset the multiple selections in the combo box control, and more.
You can follow this reset combo box control approach for other Power Apps controls. It will work fine.
Also, you may like:
- Sort Power Apps Combo Box Items
- Calculate Business Days Excluding Weekends Holidays in Power Apps
- Set Combo Box Value On Button Click in Power Apps
- Save Power Apps Current User and Manager Name in SharePoint Person Column
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com