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

Implementing RLS Incompatible types for comparison

Hi guys

 

I'm creating a gallery to edit some fields in a form. For this gallery I need to implement a simply RLS for the user can only edit the info that he submitted previously. For this app I'm using as a database a table un dataverse.
So, to filter the gallery to implement the RLS, I'm using the next expression:

Filter('Table name','Created By'=User().FullName)

That 'Created By' field is an automatic field that the dataverse table creates with the full name of the user that created the record.

The issue is that when I entered the expression it shows an error saying: Incompatible types for comparison. These types can't be compared: Record, Text.Any ideas on how to fix this? I've tried to find a workaround for this but haven't found anything that works.

Thanks in advance for the help!

1 ACCEPTED SOLUTION

Accepted Solutions
SebS
Memorable Member
Memorable Member

@dev85 

 

Maybe try this way

 

Filter('Table name','created by'.'Primary Email (internalemailaddress)' = User().Email)

 

 


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

View solution in original post

4 REPLIES 4
SebS
Memorable Member
Memorable Member

@dev85 

 

Maybe try this way

 

Filter('Table name','created by'.'Primary Email (internalemailaddress)' = User().Email)

 

 


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
Matren
Responsive Resident
Responsive Resident

Hi @dev85@SebS,

 

Here's another suggestion because I think you have a syntax issue:

 

Filter(DataSource,"CREATED_BY"=User().FullName)

The previous worked for a SP list so perhaps you need to add " " around created by, and may need to include the underscore?

 

Best Wishes,

Matren

--------------------------------------------------------------------------------------------

Find this post helpful, give it a Thumbs Up

Solved your problem, click Accept as Solution so others can find it

Hi @SebS 

 

This worked! Well, for this case I changed the 'Created By'.'Primary Email' for 'Created By'.'Full Name' and worked like a charm. Thanks!

SebS
Memorable Member
Memorable Member

@dev85 

 

You are Welcome


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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