Recent

Nintex Forms hiding fields by group membership

This article explains how to hide fields on a Nintex form based on the current person’s membership in a group, for example making a field or fields only visible to the Site Owners group.

**If you want to hide fields based on any other criteria, like for example hiding a field based on a value selected in a dropdown field or only showing certain fields when editing a form (not on new forms). Please go to the Hiding fields using Rules tutorial.

Hiding based on membership in a SharePoint Group

Any field or fields you want to hide on a form should be placed in a panel. This will ensure both the field(s) and it’s label(s) are both hidden, and that there are no blank spots on the form where the fields used to be. In this tutorial we are going to make the Status field only visible to members of a specific SharePoint group. This is an excellent way to make a field or fields only visible to the people administering the process such as the Site Owners group for example.
Nintex-Forms-Hide-Membership-15-1
1. Go to the list and open up Nintex Forms. The first thing we are going to do is make the form wider and longer so we have room to add panels to the form. Click on the Nintex Forms tab, click on Settings.
Nintex-Forms-Hide-Rules-15-2

2. On the Settings menu, add 500 to the Canvas height and add 50 to the Canvas width.
Nintex-Forms-Hide-Rules-15-3

3. So in this example the height went from 400 to 900 and the width went from 700 to 750. When you are done, click on the Save button.
Nintex-Forms-Hide-Rules-15-4

4. Select the field you want to hide and all the fields below it, so the Status field and all the fields below it in this example. Tip: Click in the gray area to the left of the fields and drag across and down the form to select all the desired fields at one time.
Nintex-Forms-Hide-Rules-15-5

5. When the fields are selected, drag the selected fields to the bottom of the form.
Nintex-Forms-Hide-Rules-15-6

6. You should now have a blank area in your form above the field you want to hide.
Nintex-Forms-Hide-Rules-15-7

7. Find the Panel form control, drag it onto your form into the blank area.
Nintex-Forms-Hide-Rules-15-8

8. Resize the panel so it fits into the blank area. Make the panel wider than your fields, this will make the panel easy to select and view later on.
Nintex-Forms-Hide-Rules-15-10

9. Select the field you want to hide and it’s label (again click and drag across and down)
Nintex-Forms-Hide-Rules-15-11

10. Drag the highlighted field and it’s label into the panel. Make sure the panel is highlighted in blue which signifies you are placing the field and the label into the panel. There will be a little gap between the top of the panel and the top of your field, this is ok.
Nintex-Forms-Hide-Rules-15-12

11. Resize the Panel so it’s about the same height as the label and field, there should be a small gap both above and below the field to ensure the entire field is inside the panel.
Nintex-Forms-Hide-Rules-15-13

12. Highlight and select all the fields below the panel and drag them up beneath the panel. Again make sure there is a small gap beneath the panel. If you overlap the panel with the field or label below, that will cause a large gap when the field is hidden.
Nintex-Forms-Hide-Rules-15-14

13. As a check, click on the right-hand side of the panel. This should highlight the panel, and any fields and labels that are inside the panel.
Nintex-Forms-Hide-Membership-15-2

14. Double click on the field or panel you want to hide, in the Control settings under the Appearance section, change the Visible dropdown to Expression. Then click on the Insert reference icon to the right of the expression field.
Nintex-Forms-Hide-Membership-15-3

15. On the insert reference screen, click on the Inline Functions tab. Double click on the IsMemberOfGroup function.
Nintex-Forms-Hide-Membership-15-4

16. Double clicking will add the function to the ‘Dynamic text to insert’ text box at the bottom of the insert reference screen. In the brackets ( ) of the function, insert the name of the group you want the field to be visible to. In this example I inserted ‘Bridge Example Site Owners’ which is the name of the SharePoint group. Click OK when finished.
Nintex-Forms-Hide-Membership-15-5

17. The Control Settings screen should now look similar to this. Click the Save button to save your new settings.
Nintex-Forms-Hide-Membership-15-6

Finished Preview: If you are not in the Bridge Example Site Owners group, the Status field is hidden on the form:
Nintex-Forms-Hide-Membership-15-7

Hiding from multiple groups

You can hide a panel from 2 groups, but that appears to be the limit.  To hide from 2 groups you need to use the OR inline function:
NF-ismemberofgroup-troubleshooting-16-2

See the Troubleshooting isMemberOfGroup tutorial for more information.

White spaces or gaps in your form

 **If you discover that you have white space or gaps where your hidden panels or fields were, please see the Hidden fields leaving spaces in Nintex forms tutorial.

About Nick Hurst (84 Articles)
SharePoint and Nintex developer who strives to find easy to deploy and maintain solutions for business problems.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: