Skip to main content
Nintex Community Menu Bar

Display Nintex Forms Panel based on User’s Role

  • November 1, 2017
  • 3 replies
  • 37 views

Forum|alt.badge.img+1

Let’s say there is a SharePoint list of users with an additional column that contains a role per each user. On another list, a Nintex Form contains a panel that needs to be displayed only if the current user is assigned a specific role. What is the best way to accomplish this?

3 replies

Forum|alt.badge.img+9

You can write a rule to hide a panel like below.

lookup('Users','User Name',UserNameA,'Role') == RoleA

UserNameA and RoleA are control names in current form (what values you are entering).


Forum|alt.badge.img+1

Thank you! Set it up per your reco, like this:

lookup('User Roles', 'User', {Common:CurrentUser}, 'Role')!='Screener'

I used '!=' rather than '==' because I want the panel to be hidden if the current user is NOT assigned the role 'Screener'. I expected it to work, but the panel remains hidden even though I (the current user) is assigned the role 'Screener'.

CurrentUser resolves to i:0#.w|domainusername. Will this not compare to the Person or Group column 'User' on the 'User Roles' SharePoint list?


Any suggestions?


Forum|alt.badge.img+9

Yes. 'Current User' will returns value like i:0#.w|domainusername, So you want to get the diaplay name from this login value. Use 'userProfileLookup' formula to get name from it. So final formula looks like

lookup('User Roles','User',userProfileLookup(Current User,"PreferredName"),'Role') != 'Screener'