Forum Discussion
Anonymous
4 years agoNot applicable
Help with logic on row level security
Please can someone help with a row level security query. I have the following tables EntityA User [email protected] [email protected] [email protected] EntityB Name I...
- 4 years ago
Anonymous
Ah, yes. Looks like it's the wrong way round.
VAR _User = USERPRINCIPALNAME() RETURN (_User IN EntityA ) || ((NOT _User IN EntityA) && EntityB[Icon] <> "C").. here's the results
PaulOlding
Solution Sage
4 years agoHi Anonymous
You could use this in the RLS filter expression for EntityB
VAR _User = USERPRINCIPALNAME()
RETURN
(_User IN EntityA && EntityB[Icon] <> "C")
|| (NOT _User IN EntityA)
Be aware that USERPRINCIPALNAME() can give you a different result in Desktop that it does in PBI Service.
- Anonymous4 years agoNot applicable
I'm receiving the following error:
The number of arguments is invalid. Function CONTAINSROW must have a value for each column in the table expression.
Is it because the User field is not specified in Entity A?
- PaulOlding4 years ago
Solution Sage
Anonymous
Ah, yes. Looks like it's the wrong way round.
VAR _User = USERPRINCIPALNAME() RETURN (_User IN EntityA ) || ((NOT _User IN EntityA) && EntityB[Icon] <> "C").. here's the results