Forum Discussion
Row Level Security Errors
Lucy01 Well, what the code is doing is getting the user's USERPRINCIPALNAME which is generally the user's email adress. It is then getting a Team from DataSheet although not sure how that is working exactly unless there is only a single row in DataSheet?? Then it is returning a count of rows after filtering the Team Access table by comparing UserUPN to the email address and Team to the Team and checking if it is > 0.
The way it is going about it is kind of strange honestly. Generally what I would do is to get the user email address and team and simply do a logic statement if the email equals the UserUPN and the team equals the team, then true otherwise false. Do you even need to check the team if the email addresses match?
What is the error you were getting trying to form the relationship? Can you maybe describe your data or provide some samples from the tables you are dealing with?
- Lucy0111 days agoHelper I
Thanks for your response. Can you explain more about the logic statement as that might be a better way of approaching this, thanks