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 gallery with...
Power Apps
Unanswered

Filtering gallery with multiple dropdowns, comboboxes, search input & date picker controls.

(0) ShareShare
ReportReport
Posted on by 174

Hello experts,

I am trying to filter my gallery with four dropdowns, two combo boxes, two date pickers (for selecting a range of dates) & a textinput for contains search. My data source is SQL server and I am using created views for showing data and I have more than three hundred thousand records in it. Below is the formula that I am using but its not working. Also, the formula for my three dropdowns is as follows 

Daypart_Dropdown_1 - (Items): ForAll(Split(("All," & Concat( ForAll(Distinct(vw_Job_List,DayPart ), {Result: ThisRecord.Value}),                  Result&",")), ","), {Result: ThisRecord.Value})

Season_Dropdown_1 - (Items): ForAll(Split(("All," & Concat( ForAll(Distinct(vw_Job_List,Season ), {Result: ThisRecord.Value}), Result&",")), ","), {Result: ThisRecord.Value})

Brand_Dropdown_1 - ForAll(Split(("All," & Concat( ForAll(Distinct(vw_Job_List,Brand ), {Result: ThisRecord.Value}), Result&",")), ","), {Result: ThisRecord.Value})

Category_Dropdown_1 - ForAll(Split(("All," & Concat( ForAll(Distinct(vw_Job_List,Category ), {Result: ThisRecord.Value}), Result&",")), ","), {Result: ThisRecord.Value})

Photogrpaher_Combo_1 - (combobox) items - Another view was created just to get the names of the photographers in it.

and same goes for talent combo box.

the code for gallery is below 

Search(Filter(vw_Job_List,(Daypart_Dropdown_1.Selected.Result="All"||DayPart=Daypart_Dropdown_1.Selected.Result)&&(Season_Dropdown_1.Selected.Result="All"||Season=Season_Dropdown_1.Selected.Result)&&(Brand_Dropdown_1.Selected.Result="All"||Brand=Brand_Dropdown_1.Selected.Result)&&(Category_Dropdown_1.Selected.Result="All"||Category=Category_Dropdown_1.Selected.Result)&&(JobPhotographer=Photogrpaher_Combo_1.Selected.FullName)&&(TalentName=Talent_Combo_box_1.Selected.'Full Name')&& DateValue(ShootDate,"EN-us")>=DatePicker1_3.SelectedDate,DateValue(ShootDate,"EN-us")<=DatePicker1_4.SelectedDate),TextInput7_1.Text,"EpisodeTitle","JobPhotographer")

But its not showing any results please do help me in fixing this code and how to avoid delegation warning so that it could work along all the records. Also I have added a screenshot for your reference

@BCBuizer @Drrickryp @CNT @TheRobRush @Rusk  Hope you guys will help me out with this issue 

pw7.PNG

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @muzamil-baxture ,

     

    As a first step, the Search function needs to be removed and replaced with StartsWith:

     

     

    Filter(
    	vw_Job_List,
    	Daypart_Dropdown_1.Selected.Result="All"||DayPart=Daypart_Dropdown_1.Selected.Result,
    	Season_Dropdown_1.Selected.Result="All"||Season=Season_Dropdown_1.Selected.Result,
    	Brand_Dropdown_1.Selected.Result="All"||Brand=Brand_Dropdown_1.Selected.Result,
    	Category_Dropdown_1.Selected.Result="All"||Category=Category_Dropdown_1.Selected.Result,
    	JobPhotographer=Photogrpaher_Combo_1.Selected.FullName,
    	TalentName=Talent_Combo_box_1.Selected.'Full Name', 
    	DateValue(ShootDate,"EN-us")>=DatePicker1_3.SelectedDate,
    	DateValue(ShootDate,"EN-us")<=DatePicker1_4.SelectedDate,
    	StartsWith("EpisodeTitle", TextInput7_1.Text) || StartsWith("JobPhotographer",TextInput7_1.Text)
    )

     

     

    If there are still delegation warnings, please share a screenshot with the blue squiggly lines to indicate which of the conditions are causing the issue.

  • muzamil-baxture Profile Picture
    174 on at

    @BCBuizer  thanks for replying, My database is SQL server so Search function is delegable I don't have delegation warning for that, also its my requirement to have 'contains search' and as we know that can only be implemented by using search function. I have delegation warning at the date picker control, I think date functions are not delegable in it. So what could be the possible workaround for it ? as I have to deal with more than  three hundred thousand records. Also its the requirement of the project to have that much data in it.

  • BCBuizer Profile Picture
    22,654 Super User 2026 Season 1 on at

    Hi @muzamil-baxture ,

     

    No expert on using SQL as a datasource here.

     

    However, according to the documentation a workaround is to use calculated columns: SQL Server - Connectors | Microsoft Learn

  • WarrenBelz Profile Picture
    154,889 Most Valuable Professional on at

    Hi @muzamil-baxture ,
    Responding to the PM you sent - if your date values are stored as Dates, you should not need DateValue()

    Search(
     Filter(
     vw_Job_List,
     (
     Daypart_Dropdown_1.Selected.Result = "All" || 
     DayPart = Daypart_Dropdown_1.Selected.Result
     ) &&
     (
     Season_Dropdown_1.Selected.Result = "All" || 
     Season = Season_Dropdown_1.Selected.Result
     ) && 
     (
     Brand_Dropdown_1.Selected.Result = "All" || 
     Brand = Brand_Dropdown_1.Selected.Result
     ) &&
     (
     Category_Dropdown_1.Selected.Result = "All" || 
     Category = Category_Dropdown_1.Selected.Result
     ) && 
     JobPhotographer = Photogrpaher_Combo_1.Selected.FullName && 
     TalentName = Talent_Combo_box_1.Selected.'Full Name' && 
     ShootDate >= DatePicker1_3.SelectedDate,
     ShootDate <= DatePicker1_4.SelectedDate
     ),
     TextInput7_1.Text, 
     "EpisodeTitle",
     "JobPhotographer"
    )

     

     

  • muzamil-baxture Profile Picture
    174 on at

    @WarrenBelz , Thanks for replying I really appreciate your response. The date values are stored in form of text that's why I had to use the 'DateValue()'  function, and this is giving me delegation warning. Is there a workaround for this as I have a very large dataset in SQL server ?

  • WarrenBelz Profile Picture
    154,889 Most Valuable Professional on at

    Hi @muzamil-baxture ,

    Then you have a Delegation issue as the DateValue() function is not Delegable, however @BCBuizer has a good point that you may be able to leverage - it will be a bit more complex than this splitting out the text elements. I am not an SQL user either and am quite surprised that Dates have this issue, even if not in Text form.

    WarrenBelz_0-1682579186981.png

     

  • coreypac Profile Picture
    13 on at

    I built my screen with multiple Text boxes one per column to give the user the ability to filter the gallery by typing in each textbox.  You may be able to adapt my code to meet your needs:

     

    //This Code Goes into Gallery Items: 
    
     Filter(
    
     CollectionName,
    
     (Find(Lower(txtboxFilter1.Text), Lower(ColumnName1)) >=1) &&
    
     (Find(Lower(txtboxFilter2.Text), Lower(ColumnName2)) >=1)
    
     )
  • muzamil-baxture Profile Picture
    174 on at

    Hey @coreypac , Thanks for replying, But I didn't understand what you share please could you elaborate  more ?

    Thanks

  • coreypac Profile Picture
    13 on at

    Try my Filter code in your Gallery Items property by first only defining your search TextBox and the Column it will be searching on.  Do this one by one adding in your combo boxes with additional and statements: ''&&".  I always start as simple as I can get that working then slowly add complexity. 

     

    Using the Find function with the Filter Function returns the starting position so including the "<=1" at the end enables this method to function with multiple search items.   You can reference The Filter and Find functions here: https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-filter-lookup

    and here: https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-find

     

    If you want to use a combo instead of a Textbox just add another line to the filter formula I referenced before. 

    like this :

     (Find(ComboBox.Selected.Value, ColumnName) >=1)

     

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 547

#2
WarrenBelz Profile Picture

WarrenBelz 444 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 322

Last 30 days Overall leaderboard