There are employees in our database and they all have different “roles” which are predefined by the admin - me.
I have created an expression from a slice from the main employee sheet that filters out all but the current user, to ‘log’ the role of an employee when he/she logs in. Its any(Profile slice[Role]).
Now there’s an action within the employee profile, named Employee Expenses which takes a seeker to the expense table of the concerned employee.
I want that action to be available to Admins, moderators and managers, and managers should not be able to view the action when the concerned person is an Admin or moderator.
I have written the following expression:
and(any(Profile slice[Role])=“Manager”, and([_THISROW].[Role]<>“Admin”, [_THISROW].[Role]<>“Moderator”)),
But the action is showing up for every employee, when the reviewer is a ‘Manager’, regardless of his/her position in the company hierarchy. I cannot figure out what’s wrong.