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 / Filtering on multiple ...
Power Apps
Answered

Filtering on multiple fields-refreshing a criteria when the selection criteria is deselected from a combobox

(0) ShareShare
ReportReport
Posted on by 30

So, good people, I have a conundrum; I want to filter a gallery by multiple criteria depending on whether the criteria are selected.

 

I have this code:

 

 

Filter(
 colMeeting,
 If(
 IsBlank(FMLocationCombo.SelectedItems),
 true,
 MeetingLocation=First(FMLocationCombo.SelectedItems).Title
 ),
 If(
 IsEmpty(FMStartDatePicker.SelectedDate),
 true,
 InteractionStartDate=FMStartDatePicker.SelectedDate
 )
)

 

 

This works really well, thanks to a previous question and solution.

 

Here's the rub, it doesn't work if I then deselect the location from the combo box. Its as if something remains in the Combo box, like an empty string.

 

If I select just a date, I get a list of meetings for that date, regardless of the location. If I then select a location, I correctly get the meetings for that date and location. BUT, if I then deselect the location I expect to again get the set of results I got from just selecting the date; what I actually get is an empty set of results.

 

Why? How do I solve this.

 

For context, I also want to extend this code to include another selection from another combo box and then further to populate a 3rd combo box with a list of people and include that into the mix.

 

 

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,399 Most Valuable Professional on at

    Hi @Boom_Meringue ,

    Try

    Filter(
     colMeeting,
     If(
     IsEmpty(FMLocationCombo),
     MeetingLocation=First(FMLocationCombo.SelectedItems).Title,
     IsEmpty(FMStartDatePicker.SelectedDate),
     InteractionStartDate=FMStartDatePicker.SelectedDate
     )
    )

     

    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.

  • Boom_Meringue Profile Picture
    30 on at

    @WarrenBelz 

     

    Thanks for taking the time to reply, but unfortunately that hasn't worked.

     

    With that code I get no results at all.

  • Verified answer
    Boom_Meringue Profile Picture
    30 on at

    Solved:

     

    Filter(
     colMeeting,
     If(
     CountRows(FMLocationCombo.SelectedItems)<1,
     true,
     MeetingLocation=First(FMLocationCombo.SelectedItems).Title
     ),
     If(
     IsEmpty(FMStartDatePicker.SelectedDate),
     true,
     InteractionStartDate=FMStartDatePicker.SelectedDate
     )
    )
  • WarrenBelz Profile Picture
    154,399 Most Valuable Professional on at

    Hi @Boom_Meringue ,

    Glad you got it gong - not on PC and could not test - the direction was right but I think should have been

    Filter(
     colMeeting,
     If(
     IsEmpty(FMLocationCombo.SelectedItems.Value),
     MeetingLocation=First(FMLocationCombo.SelectedItems).Title,
     IsEmpty(FMStartDatePicker.SelectedDate),
     InteractionStartDate=FMStartDatePicker.SelectedDate
     )
    )

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard