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 / AND filtering with com...
Power Apps
Answered

AND filtering with combo box

(0) ShareShare
ReportReport
Posted on by 11

I have a column containing a string of skillsets. I want to filter by this column using a user selected combo box. The combo box is loaded using a seperate table containing skillset name. If the user selects skillsets A and B, I want to filter to only skillsets strings that have both A and C, e.g A,C or A,B,C. The current setup I have with the combo box only allows me to filter 1 skillset using 

cbSkillsets.Selected.Name in Skillsets.
How do I solve this? I have tried ForAll but this does not seem to work within the filter function
Categories:
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @Titech ,

     

    A combobox has a "SelectMultiple" property, allowing you to select multiple values in one go.

     

    Then, to check if multiple values are present in a table, you can do something like this:

     

    Filter(
     datasource,
     Not(
     IsEmpty(
     Filter(
     Split(column, ","),
     Result in Combobox.SelectedValues.Value
     )
     )
     )
    )
  • Titech Profile Picture
    11 on at

    Thank you, but this still gives me the OR results, and it only shows the results where the selection is the first word. I want the results to show only the strings where it has all the selections.

    On a related note, both your solution, and one that I tried, I get a delegation warning on the function. Then when I use the page in my model driven app, I get an error like this 

    Titech_0-1679997986927.png

     

  • Verified answer
    WiZey Profile Picture
    3,023 Moderator on at

    The AND was a bit tricky, but this should work:

     

    Filter(
     datasource;
     CountIf(
     ForAll(
     Split(
     column;
     ""
     );
     If(
     Value in ComboBox.SelectedItems;
     {Result: true};
     {Result: false}
     )
     );
     Result
     ) = CountRows(ComboBox.SelectedItems)
    )

     

    The delegation warning is caused by the "Split()" function which cannot be delegated. This means it won't be able to work with more than 2000 records. 

     

    To resolve it, you can "Collect()" the list in a local collection and work with the collection instead of the list.

     

    As for the error, it's hard to tell if it comes from Power Apps, from the formula or from the server. Is it happening everytime you work with the datasource?

  • Titech Profile Picture
    11 on at

    This works, thank you! I tried doing something like this but could not figure out how to use ForAll(). 

    As for the delegation warning, the weird thing is that I only have around 500 records, connected from dataverse, so I thought it was some other issue. The error occurs together with the delegation warning, the data loads when there is no delegation warning.
    But all is good, once I used a collection for the data instead, the error went away. 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 130

Last 30 days Overall leaderboard