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 / reset dropdown when ro...
Power Apps
Unanswered

reset dropdown when row has been removed

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I have a dropdown that I want to be able to automatically removed once a row is removed from the table. There's a button I click on to remove the row but once its removed, The removed row still shows as a default with a X next to it in the dropdown box. I want it to disappear totally and default to the next available row.

 

I'm using the update context variable but I'm not sure if that's the best way to go.

Categories:
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Hi oria5467, 

     

    Just want to make sure I understand your question right: You have a dropdown of say 5 values. There's a button that when clicked that removes one of the items in the dropdown (say 1st as an example). But once its removed, the removed row still shows as a default with a X next to it in the dropdown box. A few questions:

     

    1. How are you populating the dropdown? Is it an option set or a collection or simply a set of text values? 

    2. Can you provide the expression that you are using to remove the item from the dropdown? 

     

    In the meantime, I am going to try this and let you know how I make it work. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    1. How are you populating the dropdown? Is it an option set or a collection or simply a set of text values? 

    On change: Set(selectedvalue,First(Filter('[dbo].[BPATLoadStaging]',SourceName=Dropdown7.Selected.Result))); Dropdown 7 is the primary key drop down and source name is another dropdown that depends on dropdown 7 to populate.

    Items: '[dbo].[BPATLoadStaging]'

    Defaultseleteditems: selectedvalue

    2. Can you provide the expression that you are using to remove the item from the dropdown? 

    I pretty much set the reset property on the dropdown  7 to "resetprojectcodevar" and added *update({resetprojectcodevar: true})* to the *delete row button* on select property.

    The dropdown is pretty much filtering a form.

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    I had prepared this example, so sharing it although not sure if its the same as yours (I will review yours after this one and add another example): 

     

    I have a dropdown that is populated with a collection (which is being defined by a button): ClearCollect(DropdownCollection, "Value 1", "Value 2", "Value 3")

     

    I then have a dropdown with this collection as the data source

     

    I have another button that removes the 1st time. When I hit that button, the item gets removed and the dropdown defaults to the 2nd value. I have recorded a video as well: Here is the link: https://drive.google.com/file/d/1hHa7F82RIqMjMuvTDh8d3ZAlg_H480Wf/view?usp=sharing 

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Are you using a dropdown or a combobox? 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    combobox. 

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Just making sure I got it right:

     

    1. So you have a combo box that is populated with Items property as Items: '[dbo].[BPATLoadStaging]'

    2. For that same combo box, the DefaultSelectedItems property is Defaultseleteditems: selectedvalue

    3. The reset property of the combo box is resetprojectcodevar

    4. The button to remove a value has its OnSelect as update({resetprojectcodevar: true})

     

    So 2 questions: 

    1. How are you "removing" a value or do you just want to reset the combo box to select a default value? 

    2. Is there a specific reason why you are using a combo box vs a dropdown? 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard