ProTip: Change What Fields Are Visible Based On A User's Group Membership

Dynamically change your form fields in response to Group membership

Did you know that you can dynamically change what fields are visible to users based on their Group memberships? Leveraging Dynamic Field Properties (DFP) and the ISINGROUP function, form builders can easily configure their forms to show and hide fields for certain users. This is useful for teams with groups of users responsible for completing different aspects of a form. 

What is a Group? 

Groups are a collection of users who share similar responsibilities and use the same forms to complete their role. Permissions are assigned at the Group level and dictate how much access a user has to your GoFormz account, for example, the ability to delete forms, reopen completed forms, access specific templates, and more. 

For this use case, we’ll be utilizing Groups to determine what fields should be made Visible when a form is created or opened.  

Use case example: Incident & Injury Reports
Imagine a field technician is injured on the job and a digital Incident & Injury Report must be completed by another onsite technician. Once this report has been completed, the form is then automatically transferred to that job site’s supervisor, for their review. When the supervisor opens the report, fields not visible to the onsite technician could then be made Visible (for instance, a ‘Supervisor Signature’ field, which the technician would not have needed to complete).

What is the ISINGROUP function? 

Often, different users use the same form in completely different ways. The ISINGROUP function can be applied to a variety of fields, to dynamically change how they display or operate, based on the user’s Group. For this use case, we’ll be using the ISINGROUP function to make our Visible property dynamic. 

How to use ISINGROUP to change what form fields are Visible based on a user’s Group membership: 

1. Login to GoFormz from a computer and open the Template of the form you would like to edit. 

2. Select the field you would like to make dynamically Visible for a specific Group. For this example, we’ll select the ‘Supervisor Signature’ Signature field. 

3. Navigate to the Properties panel, to the right of your form Template, and locate the Visible property. Click the ellipses icon [...] to the right of the Visible drop down and select ‘Use a custom calculation’. 

Add a custom ISINGROUP calculation to make your Visible property dynamic

4. Enter the following calculation, =IsInGroup("GROUPID") and replace “GROUPID” with the appropriate Group ID number. You can find the Group ID by clicking into the Group and copying the ID number from the URL. For this example, we’ll be making this field Visible for our ‘Supervisors’ Group. If the ‘Supervisors’ Group ID was ‘098f311e-a398-4c0e-9697-a1ea0135b204’, the calculation would look like =IsInGroup("098f311e-a398-4c0e-9697-a1ea0135b204"). 

You can find a Group ID by navigating to the group and copying the ID number

5. Click ‘Save Changes’. 

Now, when a user in the Supervisors Group opens a digital Expense Report, the ‘Supervisor Signature’ field will be Visible. However, if a member of another Group were to generate an Expense Report, this field would not be Visible

Check out this blog post to learn how to make your form fields dynamically Required based on Group membership.