Hello,
You could execute adv2 getUserDetails() on load and pass in current user as paramater to obtain 'Department' and 'Title' properties.
Regards,
Matt
K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member.
This is pretty clunky to filter based off of department. I had to go through all of the fields in the Current User settings to figure out that it has to be "Name" for it to filter. Otherwise, I get an error that it couldn't resolve.
While this will work, albeit with lots of setup, is there a way to do the same process but to do it based upon the user's K2 Role. I have one role that contains power users for this workflow that cross multiple departments. Those users should see more. If not, I'm going to have to manually exclude those users in each of the filters that I write per department.
Hello,
If you want to go through the excercise against a K2 role I would create a hidden data label and on intitialize you can execute getRoleUsers(). I would then hardcode the role name as a paramater and then pass in current user FQN as a filter. You can then return output to hidden label. If hidden label contains data then user is member of role and would have elevated view rights, else they would not.
Method is located in following path...
System > Management > UserManagement > SmartObjects > UMUser > getRoleUsers();
Regards,
Matt
K2 will not accept any liability for any issues arising from actions taken in respect of the information provided by any forum member.