Forum Discussion

kevinEGE's avatar
kevinEGE
Regular Visitor
3 years ago
Solved

RLS with levels

Hello,

 

I got a dashboard with 4 tables;

 -The first one have 3 columns: Leader, department and Leader Email.

 -2nd have 3 columns: employee, department and employee Email.

 -3rd are some project details, wich includes employee, department and project ID.

 -The last one are the projects simplified, with ID.

 

The relationship between the tables are:

 -1st and 2nd related department;

 -2nd and 3rd related by employee;

 -3rd and 4th related by ID;

 

like this:

 

So im trying to do a RLS, in the way the employees just see the projects in wich they are working and the leader need to see ALL of their department.

 

I could manage to do the first step with USERPRINCIPALNAME(), without issues, but i cant manage to make the leaders see everything of they department.

 

Any solution?