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

filtering with multiple combobox

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm currently attempting to filter my gallery with 6 different comboboxes. Right now, I can click on a filter button, which takes me to a page with all the comboboxes. The data in each combobox comes from a different column, same data source. I'm basically trying to get all of the comboboxes working. This is what I have currently and it works for one box but I cannot figure out how to get it to work for them all at once:

 

Combobox1 - Items: Choices('Protocol Template Database'.'Product Family Type')

 

Gallery - Items: If(!IsEmpty(ComboBox1.SelectedItems),Filter('Protocol Template Database',ComboBox1.Selected.Value),'Protocol Template Database')

 

I'm working through SharePoint. The list is called Protocol Template Database. I'd also like to figure out how I can add search function and sorting function to the gallery items code without disrupting the rest of the data set. 

 

Thank you,.

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to filter your Gallery Items based on any combination of 6 ComboBoxes?

     

    Regarding your needs, I have made a test on my side, please try the following formula (set the Items property of Gallery to following😞

    Filter(
     'Protocol Template Database',
     If(
     IsBlank(ComboBox1.Selected.Value),
     true,
     'Product Family Type'.Value = ComboBox1.Selected.Value
     ),
     If(
     IsBlank(ComboBox2.Selected.Value),
     true,
     'Choice Field 2'.Value = ComboBox2.Selected.Value
     ),
     If(
     IsBlank(ComboBox3.Selected.Value),
     true,
     'Choice Field 3'.Value = ComboBox3.Selected.Value
     ),
     ...
     ...,
     If(
     IsBlank(ComboBox6.Selected.Value),
     true,
     'Choice Field 6'.Value = ComboBox6.Selected.Value
     )
    )

    Note: I assume that all of your 6 ComboBoxes are connected to Choice type columns in your 'Protocol Template Database' List.

     

    If you want to add a Search function to above Filter function to search result based on the TextSearchBox, and add a Sort function to above formula to sort records, please try the following formula:

    Sort(
     Search(
     Filter(
     'Protocol Template Database',
     If(
     IsBlank(ComboBox1.Selected.Value),
     true,
     'Product Family Type'.Value = ComboBox1.Selected.Value
     ),
     If(
     IsBlank(ComboBox2.Selected.Value),
     true,
     'Choice Field 2'.Value = ComboBox2.Selected.Value
     ),
     If(
     IsBlank(ComboBox3.Selected.Value),
     true,
     'Choice Field 3'.Value = ComboBox3.Selected.Value
     ),
     ...
     ...,
     If(
     IsBlank(ComboBox6.Selected.Value),
     true,
     'Choice Field 6'.Value = ComboBox6.Selected.Value
     )
     ),
     TextSearchBox.Text,
     "TextColumn1", // replace here with actual Text type column name from your List, the column name should be wrapped with double quotes
     "TextColumn2"
     ),
     ColumnName, // Choose column from your List as Sort column
     SortOrder.Ascending
    )

     

    Please try above solution, hopes it could solve your problem.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-xida-msft ,

     

    No red alerts, but I'm getting the delegation warning and "This data type is unsupported for evaluation" for the comboboxes and the search box. My data is gathered directly from SharePoint, does that make a difference? My data is also not showing/generating within the Gallery now. This is what I just tried in the Gallery:  

     

     

    Sort(
     Search(
     Filter(
     'Protocol Template Database',
     If(
     IsBlank(ComboBox7.Selected.Value),
     true,
     'Combination Product Classification'.Value = ComboBox7.Selected.Value
     ),
     If(
     IsBlank(ComboBox8.Selected.Value),
     true,
     'Product Global Trade Name'.Value = ComboBox8.Selected.Value
     ),
     If(
     IsBlank(ComboBox9.Selected.Value),
     true,
     'DP Product Code'.Value = ComboBox9.Selected.Value
     ),
     If(
     IsBlank(ComboBox10.Selected.Value),
     true,
     'Product Configuration #'.Value = ComboBox10.Selected.Value
     ),
     If(
     IsBlank(ComboBox11.Selected.Value),
     true,
     'Does this product configuration include a medical device?'.Value = ComboBox11.Selected.Value
     ),
     If(
     IsBlank(ComboBox12.Selected.Value),
     true,
     'Product Family Type'.Value = ComboBox12.Selected.Value
     )
     ),
     TextSearchBox1.Text,
     "Product_x0020_Family_x0020_Type",
     "Product_x0020_Global_x0020_Trade"
     ),
     'Product Family Type',
     SortOrder.Ascending
    )

     

    And yes, I'm trying to filter by any combination of combo box selections. 

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    How many records stored in your SP List? More than 2000?

     

    If the amount of your SP List records is not more than 2000, you could ignore this warning issue. The Delegation warning issue is not an error, it just means that you could not delegate the data process to your SP list itself, instead, you could only process data locally.

    Currently, you could only process 2000 records at most locally. More details about the Delegation issue, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/delegation-overview

    Note: Please make sure you have set the "Data row limit for Non-delegable queries" option to maximum value -- 2000 within Advanced settings of App settings of your app. Currently, the If(...) function could not delegated inside a Filter function, your Delegation issue is related to this.

     

    If the amount of your SP list records is more than 2000, please consider check if the following thread solution or video resource could help in your scenario:

    https://www.youtube.com/watch?v=2M0zCyu__20

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-get-combobox-to-show-all-the-results-from-SP-list/m-p/612204#M193064

     

    More details about Delegation issue tips for SP List, please check the following blog:

    https://rezadorrani.com/index.php/2019/09/18/powerapps-delegation-with-sharepoint-as-a-data-source-with-respect-to-all-column-types/#respond

     

    Regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-xida-msft 

     

    The odd thing is that I don't have anywhere near 2000 entries, and although there are no actual errors (just the delegation warning), when I search, sort, or filter, there is no data populated. The gallery is blank after any searching, sorting, or filtering, is performed, even though the data should match the specifications. Sorting and searching actually doesn't work at all. With filtering, this is the error that pops up while playing the app:

     

    The requested operation is invalid. Server Response: Protocol Template Database failed: The query is not valid. clientRequestId: 02756b13-5dcc-4741-907f-388bb2e76734 serviceRequestId: 02756b13-5dcc-4741-907f-388bb2e76734

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please show more details about the error in your canvas app?

     

    Regarding the issue that you mentioned, I think this issue is related to your data source itself, rather than the formula I provided above.

     

    Please consider take a try removing the 'Protocol Template Database' SP List connection from your canvas app, then re-create a new connection to it from your canvas app, then try the formula again, check if the issue is solved.

     

    If the issue still exists, please consider generate a new canvas app based on your 'Protocol Template Database' SP List data source, then try the above formula I provided, check if the issue is fixed.

     

    Regards,

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard