cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Omar_203
Frequent Visitor

Asset Management App

Hello,

 

I am having difficulty trying to display a Distribution List in a gallery, based on a SharePoint People field. Essentially, I have a Combox Box dropdown with a list of employee names (Another SharePoint list Choices field). I want to be able to select a name from the dropdown and have the gallery display the DL name that user is a Member of.  I have tried the following, but no luck.

 

SortByColumns(Filter('Distribution Lists example', 'Current Owner'.DisplayName=ComboBox1_6.Selected.Value), "DLName", Ascending). 

 

The error is appearing with '=', message says: "Incompatible types for Comparison. Thes types can't be compared: Table, Text.

 

Although, I have another list called: "Account List" that uses a Person field and Combo Box dropdown, essentially the exact same, but this one works perfectly. see below.

 

SortByColumns(Filter('Account List Tracker','Current Owner'.DisplayName=ComboBox1_6.Selected.Value),"Title",Ascending).

 

What's the issue here, I am in need of help as I cannot figure this out.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
v-liwei-msft
Microsoft
Microsoft

Hi @Omar_203 ,

 

If you don't want to turn this option off, you can change function 

Filter('Distribution Lists example', 'Current Owner'.DisplayName=ComboBox1_6.Selected.Value)

to 

Filter('Distribution Lists example', ComboBox1_6.Selected.Value in 'Current Owner'.DisplayName)

 

Best Regards,

Levi

View solution in original post

3 REPLIES 3
v-liwei-msft
Microsoft
Microsoft

Hi @Omar_203 ,

 

Could you please tell me if you turned this option on when setting the person column?
If you open this option , PowerApp will report the error like your figure.
vliweimsft_0-1652688352254.png

 

Beat Regards,

Levi

Hi Levi,

 

No problem.

 

Omar_203_0-1652712957891.png

 

The reason this option is enabled is because for a distribution list multiple people are 'members' of that DL.

 

Is there a workaround for this so, I can get this to work ?

v-liwei-msft
Microsoft
Microsoft

Hi @Omar_203 ,

 

If you don't want to turn this option off, you can change function 

Filter('Distribution Lists example', 'Current Owner'.DisplayName=ComboBox1_6.Selected.Value)

to 

Filter('Distribution Lists example', ComboBox1_6.Selected.Value in 'Current Owner'.DisplayName)

 

Best Regards,

Levi

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,028)