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 / Filter Gallery on mult...
Power Apps
Answered

Filter Gallery on multiple dropdowns and text input

(0) ShareShare
ReportReport
Posted on by

Hello, 

I've built a simple test app for logging incidents and need to add a filtering option on the Gallery (galIncidents).

 

I have two combo boxes (ddAssignedToo & ddStatus) to search the columns with the same name.

I have one Text Input (inpIncSearchBox) for searching the DescriptionOfProblem Column.

 

Items for ddStatus:

["","Open","Completed","Cancelled","Rejected","Amendments Required","Initial Approval Complete","Approved","Pending Approval","In Progress", "On Hold"]

 

Items for ddAssignedToo:

["","DisplayName1","DisplayName2"]

 

I'm looking for all records to be displayed unless one or more of the above combo boxes or the text input is filled in.

 

I hope this makes sense and any help would be much appreciated

Categories:
I have the same question (0)
  • Doddy83 Profile Picture
    on at

    Also this list is not delegated, it will always have less than 2000 records, not sure if this is relevant or not at this point...

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Doddy83 

    Consider the following formula for the Items property of your Gallery:

    Search(
     Filter(yourDataSource,
     (IsBlank(ddStatus.Selected.Value) || Status = ddStatus.Selected.Value) &&
     (IsBlank(ddAssignedToo.Selected.Value) || AssignedToo = ddAssignedToo.Selected.Value)
     ),
     inpIncSearchBox.Text, DescriptionOfProblem
    )

    That's the basic structure. 

    Now...I am guessing that Status is a choice column and AssignedTo is a Person column.  If so, then the following:

    Search(
     Filter(yourDataSource,
     (IsBlank(ddStatus.Selected.Value) || Status.Value = ddStatus.Selected.Value) &&
     (IsBlank(ddAssignedToo.Selected.Value) || AssignedToo.DisplayName = ddAssignedToo.Selected.Value)
     ),
     inpIncSearchBox.Text, DescriptionOfProblem
    )

     

    I hope this is helpful for you.

  • Doddy83 Profile Picture
    on at

    Many thanks for taking the time to reply @RandyHayes

    I've tested this and the Text Input works a treat but I still cant get the dropdowns to work, it doesn't error but just brings back a blank list when I select anything in either dropdown? I've confirmed that the Combo box selections do match what's in each list column. Would it be anything to do with them being Combo boxes and not Dropdowns? I know I've called them ddAssignedToo & ddStatus but they are Combo boxes, NOT dropdowns.

    Search(
     Filter(IncidentRequestList,
     (IsBlank(ddStatus.Selected.Value) || Status.Value = ddStatus.Selected.Value) &&
     (IsBlank(ddAssignedToo.Selected.Value) || AssignedTo.DisplayName = ddAssignedToo.Selected.Value)
     ),
     inpIncSearchBox.Text, "ShortTitle"
    )

     

  • Doddy83 Profile Picture
    on at

    Converted to DropDowns and its now all working a treat, thank you so much again!

  • Doddy83 Profile Picture
    on at

    Another cheeky question if possible? How would I go about making it display everything except 'Completed' items if the dropdown and search box are empty?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Doddy83 

    You can incorporate pretty much anything you want into the criteria of the filter.

    I believe you might be looking for this:

    Search(
     Filter(IncidentRequestList,
     (IsBlank(ddStatus.Selected.Value) || Status.Value = ddStatus.Selected.Value) &&
     (IsBlank(ddAssignedToo.Selected.Value) || AssignedTo.DisplayName = ddAssignedToo.Selected.Value) &&
     (IsBlank(ddStatus.Selected.Value) && 
     IsBlank(ddAssignedToo.Selected.Value) && 
     IsBlank(inpIncSearchBox.Text) && 
     !(Status.Value = "Completed")
     )
     ),
     inpIncSearchBox.Text, "ShortTitle"
    )

     

  • Doddy83 Profile Picture
    on at

    I cant get that to work as is, but I will certainly have a play with the formula, many thanks again for your time on this one, it really is much appreciated when people like yourself take the time to help us lesser knowledgeable souls to enjoy tinkering with PowerApps without having to spend the time on it I'm sure you have over the years to become an expert!

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 899

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 499

Last 30 days Overall leaderboard