Forum Discussion
po
4 years agoPost Prodigy
RLS - row level security and OR operator
Hi, We have following situation 3 tables sales table distributor_number, seller_number, sales_qty 1 1 10 1 ...
- 4 years ago
Hi po ,
You can apply RLS to the main table (sales table) instead of the RLS table and check like this:
CONTAINS ( distributor_table, distributor_table[distributor_name], "joe bloggs", distributor_table[distributor_number], 'sales table'[distributor_number] ) || CONTAINS ( 'seller table', 'seller table'[seller_name], "joe bloggs", 'seller table'[seller_number], 'sales table'[seller_number] )You could download my pbix file if you need.
Did I answer your question? Mark my post as a solution!
Best RegardsLucien
amitchandak
4 years agoSuper User
po , If you create two roles and assign both two the user, it will work like OR. In a single role, it will work like AND unless a statement of Or was possible to add.
- po4 years agoPost Prodigy
Thanks for the info all
Looks like can use OR operator in RLS.
Also like the solution with CONTAINS and the associated .pbx file.