cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aleemj
New Member

Incompatible type table, text when trying to Filter based on person

Hi,  I'm a newbie to PowerApps. Would really appreciate assistance with an Incompatible types for comparison: table, text

I have a SharePoint list (Work Assignment) that has a person/group column called 'Assigned To'

I am attempting to Filter a gallery to show items that are assigned to the logged in user only.

I have tried the following with the same result. 

Filter('Work Assignment', 'Assigned To' = User().FullName) and I have also tried:

Filter('Work Assignment', 'Assigned To'.DisplayName = User().FullName)

In both instances I receive the same Incompatible comparison type error. 

Please help as I am a little beyond my depth.

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Thorpe
Super User
Super User

If the Assigned To column in SharePoint allows multiple selections then you could do this way but you will get a delegation warning because the "in" operator isn't delegable.

 

Filter('Work Assignment', User().Email in 'Assigned To'.Email )



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

6 REPLIES 6
Mike2500
Super User
Super User

Is assigned to a multi value field? If so, that's quite a bit more complex, as the assigned to would then have a set of rows, not just a single person. Otherwise, your second example looks fine:

 

Filter('Work Assignment', 'Assigned To'.DisplayName = User().FullName)

Jeff_Thorpe
Super User
Super User

The AssignTo is a record, so you need to reference a column in the record. Try this:

 

Filter('Work Assignment', 'Assigned To'.Email = User().Email)



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Hi Mike, thanks for your super quick response. Yes the Assigned to field does allow multiple selections, I had a feeling this may be causing the issue. Any advice to overcome this would be appreciated.

 

Thanks Jeff, I did try this to with the same same result. @Mike2500 in a separate reply has pointed to multiple values allowed in this field as the potential issue.

Jeff_Thorpe
Super User
Super User

If the Assigned To column in SharePoint allows multiple selections then you could do this way but you will get a delegation warning because the "in" operator isn't delegable.

 

Filter('Work Assignment', User().Email in 'Assigned To'.Email )



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
aleemj
New Member

Thanks so much @Jeff_Thorpe , this works perfectly. 

 

Helpful resources

Announcements
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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