I want to create a section to hide on a form based on a user's role, but didn't see the user's role as a variable to select when trying to set the default value on a filed. I am trying to prevent hard coding users names into the rules on the show/hide field rule.
Question
Question
Replies
replied on June 21, 2018
You would have to try and do this with custom js. I've added this feature request to our list.
0
0
replied on June 30, 2018
It looks like in the team member table there is a member_rights field that I can use. It is associated with the Security Roles, and not the named roles you can make. This will probably work for this particular case I have, but it would still be nice to be able to pull in the names roles of a team as a variable.
I found the table that has the named roles, but could not get it to query properly when I tried to connect different tables with relationships. I couldn't get all the users defined.
0
0
replied on July 2, 2018
I just created a new view on the Team Table and that should provide you with the needed team roles (of named roles)by user. see code attached.
SELECT dbo.cf_users.username, dbo.cf_users.displayname, dbo.team_members.leave_date, dbo.team_members.member_rights, dbo.team_roles.name FROM dbo.cf_users INNER JOIN dbo.team_members ON dbo.cf_users.user_id = dbo.team_members.user_id INNER JOIN dbo.team_member_team_role_mapping ON dbo.team_members.id = dbo.team_member_team_role_mapping.team_member_id INNER JOIN dbo.team_roles ON dbo.team_member_team_role_mapping.team_role_id = dbo.team_roles.id WHERE (dbo.team_members.leave_date IS NULL)
0
0
You are not allowed to follow up in this post.