web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : 3WK6sa5ym0emc5H2w6+hGX
Power Apps - Building Power Apps
Unanswered

How can I reset selected item in a combobox?

Like (0) ShareShare
ReportReport
Posted on 4 Jan 2021 08:13:37 by 149

I have a form with two dropdowns.

 

The items in the second dropdown are based on the first dropdown selection.

Everything is working fine in a New form.

 

In the Edit form, I want to clear the second dropdown selected item if the first dropdown selection changes.

This could be probably done via variables, but how?

 

In second dropdown:

Items:Filter(MyList, State_x0020_Name=ComboBox1.Selected.Result)

DefaultSelectedItems:{City_x0020_Name:ThisItem.City_x0020_Name}

I have the same question (0)
  • WarrenBelz Profile Picture
    150,394 Most Valuable Professional on 04 Jan 2021 at 22:23:12
    Re: How can I reset selected item in a combobox?

    @rohinMVP ,

    Typo now fixed (should be reset), but I will leave you with @Jitendra_jangid 

  • rohinMVP Profile Picture
    149 on 04 Jan 2021 at 18:35:21
    Re: How can I reset selected item in a combobox?

    Hi @Jitendra_jangid ,

     

    That helped me with the dropdown.

     

    Can the same be done for a textbox also?
    The textbox shows details for the item selected in combobox2.

     

    I have the below for the Textbox

     

    Default:Coalesce(varPopulation,Parent.Default)

     

     

    In Combobox2:

     

    OnChange:Set(varPopulation,ComboBox2.Selected.Population);Reset(Textbox2);

     

  • Jitendra_jangid Profile Picture
    126 on 04 Jan 2021 at 16:20:57
    Re: How can I reset selected item in a combobox?

    Hi

     

    In DefaultSelectedItems property of Combobox2 you can check whether first Combobox1 has been updated or not and based on that set the DefaultSelectedItems.

     

    If(ComboBox1.Selected.Result = ThisItem.<FirstComboboxfield>, {City_x0020_Name:ThisItem.City_x0020_Name}, {City_x0020_Name:Blank()})

     

    Also, Reset(ComboBox2) on Change of first Combobox.

  • rohinMVP Profile Picture
    149 on 04 Jan 2021 at 13:08:07
    Re: How can I reset selected item in a combobox?

    hi @WarrenBelz,

    I tried Reset(ComboBox2) and Refresh(ComboBox2), but they didn't work.

  • WarrenBelz Profile Picture
    150,394 Most Valuable Professional on 04 Jan 2021 at 08:22:01
    Re: How can I reset selected item in a combobox?

    Hi @rohinMVP ,

    I assume it is the Items you want to refresh (not the DefaultSelectedItems).

    If so, on the OnChange of your First Combo Box, simply put

    Reset(YourComboBox2Name)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 898 Most Valuable Professional

#2
Power Apps 1919 Profile Picture

Power Apps 1919 356

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 305 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete