Skip to main content
Community site session details

Community site session details

Session Id : 3Xaj0YsqVHAhGGK4zsLGQf
Power Apps - Building Power Apps
Answered

Combo Box not clearing properly

Like (0) ShareShare
ReportReport
Posted on 30 Nov 2022 14:47:06 by 72

I have a pair of combo boxes set up as filters for a gallery, one to choose a person, and one to choose a month.

The filters work fine for the most part, however if you select an item from the combo box, then re-open it and click the x to remove the selected item, the filters stop working. 

I have statements in the filtering formula so that if either is blank, it doesn't use it for the filtering so it's not the formula. I also have a button next to the combo boxes that just resets them both and that works properly and shows all items. So it seems when a user removes the item from the combo box, it does count the combobox.selected value as blank even though these is no selected item.

 

Any workarounds or settings I've missed?

  • Alchemy Profile Picture
    41 on 13 Jul 2024 at 07:21:35
    Re: Combo Box not clearing properly

    Thank you, you solved my problem as well! I had to change my formula in a few places from cmb_Filterstatus.SelectedItems, to cmb_Filterstatus.Selected.Value. I'll read up on why exactly!

  • Michael Seerup Profile Picture
    170 on 19 Dec 2023 at 22:57:52
    Re: Combo Box not clearing properly

    Fixed my issue as well. TY

  • crdawson Profile Picture
    72 on 30 Nov 2022 at 15:46:52
    Re: Combo Box not clearing properly

    That's done it, thanks!

  • Verified answer
    SebS Profile Picture
    4,204 Super User 2025 Season 1 on 30 Nov 2022 at 15:43:16
    Re: Combo Box not clearing properly

    @crdawson 

     

    I think it's not enough to just place AgentInput_1 you need to check Property so in that case IsBlank(AgentInput_1.Selected.Value) same for empty and that need to be done to all controls you try verifying cause you are checking if there is something in selection 

  • crdawson Profile Picture
    72 on 30 Nov 2022 at 15:37:59
    Re: Combo Box not clearing properly

    Thanks for the suggestion, I tried adding the IsEmpty() to the formula but it still functions the same. It functions perfectly if I click the "Clear" button I set up, but if you click the x in the combo box it breaks

    crdawson_0-1669822651114.png

     

    Here's the code:


    If(
    //If Agent filter is Blank
    Or(IsBlank(AgentInput_1), IsEmpty(AgentInput_1)),
    //Then check if month input is blank and if so show all items
    If(
    Or(IsBlank(MonthInput), IsEmpty(MonthInput)),
    Sort(
    Distinct(
    _EvaluatorRecords,
    Date(
    Year('Session Date'),
    Month('Session Date'),
    1
    )
    ),
    Result,
    Descending
    ),
    //Else, filter the results by the Month filter
    Sort(
    Filter(
    Distinct(
    _EvaluatorRecords,
    Date(
    Year('Session Date'),
    Month('Session Date'),
    1
    )
    ),
    Result = MonthInput.Selected.Value
    ),
    Result,
    Descending
    )
    ),
    //Else agent filter is not blank, check if month input is blank
    If(
    Or(IsBlank(MonthInput), IsEmpty(MonthInput)),
    //If month filter is blank, filter by only agent filter
    Sort(
    Distinct(
    Filter(
    _EvaluatorRecords,
    AgentInput_1.Selected.Result in Agent.Email
    ),
    Date(
    Year('Session Date'),
    Month('Session Date'),
    1
    )
    ),
    Result,
    Descending
    ),
    //Else, filter by both Month filter and Agent Filter
    Sort(
    Filter(
    Distinct(
    Filter(
    _EvaluatorRecords,
    AgentInput_1.Selected.Result in Agent.Email
    ),
    Date(
    Year('Session Date'),
    Month('Session Date'),
    1
    )
    ),
    Result = MonthInput.Selected.Value
    ),
    Result,
    Descending
    )
    )
    )

  • SebS Profile Picture
    4,204 Super User 2025 Season 1 on 30 Nov 2022 at 15:05:46
    Re: Combo Box not clearing properly

    @crdawson 

     

    try to add to the filleter on top of IsBlank() IsEmpty() and check if that will work or show the code from filter to verified if all is ok with it.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 1

Loading complete