How do I filter records based on the users role

The case:
I am building a quality management solution for our company. The company has multiple daughter companies and offices.
I have records I only want to show when this record is affiliated to a certain group of people with the corresponding role (so a certain company, or a certain office where these employees work).
.
There is a way and that is if I make a row and then assign this row to a certain role:
image
You assign each record to the role which can view this record and then you filter the table component within this row for this role.

That is a bit awkward, certainly when this data will be less static and more dynamic, so we are opening offices every few months…

So what I am looking for is a way to align a record to a role and then only show those records affiliated to the logged-in user.

How can I do that?

Hey Peter, I hope you are doing well today! :slightly_smiling_face:

If you would like to filter data based on a common role connection, I recommend reviewing our data source documentation here. Within the documentation, you will see an example structure involving Jobs, Users, and Companies. This example includes instructions on how you can go about filtering records based on role.

If your use case does not include a “Created By” field, I recommend creating template user records with the desired role(s) assigned. This way, you can associate the template user with your records to perform the same type of role-based filtering shown in the documented example.

1 Like