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 by pers...
Power Apps
Answered

Filter gallery by person or group combobox

(0) ShareShare
ReportReport
Posted on by 443

Hallo,

 i have a gallery which i want to filter based on a combo box that allows multiple values.

Items property in the combo box:

Sort(Distinct(Ungroup(colTargetGoals, "Assignee"), DisplayName), Result,Ascending)

Items in gallery returns error when i type the following:

 

Filter(
colTargetGoals,
And(
Or(IsBlank(AssignToCB.SelectedItems),
IsEmpty(AssignToCB.SelectedItems),
Assignee in AssignToCB.Selected.Result
),
TextInput1_2.Text in Title
)
)

"""Cannot use table values in this context..."""

Any ideas?

Categories:
  • Verified answer
    BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @marial16 ,

     

    From the look of it, the Assignee column is a multiselect column and that's why it can't be used in the context of the "in" operator as that will only accept a single value, not a table as is returned in this case.

     

    In case your combobox is a single select, you might try reversing the in statement:

    Filter(
    colTargetGoals,
    And(
    Or(IsBlank(AssignToCB.SelectedItems),
    IsEmpty(AssignToCB.SelectedItems),
    AssignToCB.Selected.Result in Assignee
    ),
    TextInput1_2.Text in Title
    )
    )

     

    https://docs.microsoft.com/en-us/power-platform/power-fx/reference/operators

  • marial16 Profile Picture
    443 on at

    Hallo,

     

    I tried this with the allow multiple selections of the combobox to 'Οn'

    Below code seems to work

     

    Filter(
    colTargetGoals,
    And(
    Or(IsBlank(AssignToCB.SelectedItems),
    IsEmpty(AssignToCB.SelectedItems),
    AssignToCB.Selected.Result in Assignee.DisplayName
    ),
    TextInput1_2.Text in Title
    )
    )

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 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard