cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Motty_25
Helper I
Helper I

Filter Gallery with Combo Box User List

Hi,
I have created a Combo Box (ComboBox4) which allows me to select users from our Office 365 Directory (through the use of the Office365Users data source).

However, I want to set up a filter gallery that filters results based on the user I have selected in the ComboBox, but I am struggling to do this.

So far, I've tried:
Filter (<DataSourceName>, ComboBox4.SelectedItems)
Filter (<DataSourceName>, ComboBox4.SelectedText)
Filter (<DataSourceName>, ComboBox4.Selected)

But none have worked.

Would appreciate any help on this. 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Motty_25,

Have you solved your problem?

Do you want to filter based on the Combo Box selected user?

Could you please share a bit more about your scenario?

Please modify your formula as below:

If(
    IsEmpty(ComboBox34.SelectedItems),
    Product,
    Filter(
        Product,
        'Current owner'.DisplayName in ComboBox34.SelectedItems.DisplayName
    )
)

I assume that the 'Current owner' is a Person column in your SP list.

Best Regards,
Qi

View solution in original post

4 REPLIES 4
zmansuri
Super User
Super User

You need column to match. Let's say you have email column in the list you want to filter based on User. That list have column named email. then gallery's item code will be

Filter(ListName, Email = ComboBox1.Selected.Mail || IsEmpty(ComboBox1.SelectedItems );

 

The above code will filter data by user's email in that list and if nothing is selected it will show all data.

Hi @zmansuri 

Many Thanks for your reply, although unless I've mis understood, it hasn't worked.

I have a column called Current Owner in the list I want to filter. That column is a user column which pulls data from our M365 directory.

I have a ComboBox, also pulling users from the M365 directory, and showing them as their DisplayName.

I want the filter gallery to show all entries where the DisplayName selected on the combo box, matches the name in the Current Owner field.

For example, if I enter an asset with the Current Owner set to Ben Mottram, I want that asset to appear in the filter gallery when "Ben Mottram" is selected on the dropdown menu.

The syntax I entered was:
Filter(List Name, 'Current owner' = ComboBox4.Selected.DisplayName || IsEmpty(ComboBox4.SelectedItems )

Hi @Motty_25,

Have you solved your problem?

Do you want to filter based on the Combo Box selected user?

Could you please share a bit more about your scenario?

Please modify your formula as below:

If(
    IsEmpty(ComboBox34.SelectedItems),
    Product,
    Filter(
        Product,
        'Current owner'.DisplayName in ComboBox34.SelectedItems.DisplayName
    )
)

I assume that the 'Current owner' is a Person column in your SP list.

Best Regards,
Qi

View solution in original post

That works, thank you!!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,074)