Forum Discussion

LaneLourcey's avatar
LaneLourcey
Frequent Visitor
4 years ago
Solved

Complicated Dynamic RLS for Employee Data in a Hierarchy

So I'm trying to impliment RLS for a HR Dashboad, but I've found the RLS setup is so complicated I haven't been able to wrap my head around it yet.

 

I have table called Headcount, which has the following fields to name a few.

  • Email (which is the same as `userprincipalname()`
  • ID
  • Manager ID
  • Division
  • Area
  • Seniority (Which is the following in decending order: Officer > Director OR General Manager > Area Manager > Team Manager > Coordinator > Contributor

That table has relationships that filter the following tables

  • Terminations (Link is ID)
  • HR Actions (Link is ID)

and I also would like it to filter another table based on the "Division" but there is no relationship setup there.

 

So my question is, what is the best approach here? It would be great if the visibility could cascade based off the Manager ID field, but it might be more sustainable to set up the visibility so that you can only see inside of your Division, and someone of lower senority. But, I have no idea how to set that up. I'll continue researching, but if anyone has any exprience setting up something similar I would apprichiate it!

2 Replies