Formula Builder Visibility Rule Examples
The visibility of tags, custom fields, and groupings can be defined by building visibility rules in the Formula Builder. For an overview of the Formula builder, click here. This article describes how to create each of the visibility rules that are shown on the Example tab in the Formula Builder.
Caution: Users should be careful not to create formulas that require a significant amount of data processing to determine whether a field should be visible or not. Running multiple portfolios of data to ascertain a project's location is an example of a formula like this. Because of the large amount of data processing necessary, references to portfolios in visibility rules are not generally recommended.
1. Hide During Creation, But Show During Viewing and Editing
This visibility rule will hide the selected tag, custom field, or grouping when an object is being created, but show it when the object is viewed or edited.
- Click in the formula builder box and type "#viewing" or "#editing". This same visibility rule can also be created by typing "NOT #creating".
- Click OK.
2. Hide From Everyone Except Administrators
This visibility rule will hide a tag, custom field, or grouping from all users unless they are Administrators.
- Click the Groups & Users tab.
- Click "isAdmin".
- Click OK.
Note: There are two different options for isAdmin. The first, isAdmin(User), is used to determine whether a particular user is an Administrator, and the second, isAdmin(), determines whether the current user is an Administrator.
3. Hide From Everyone Except The Project Owner
This visibility rule will hide a tag, custom field, or grouping from all users unless they are the owner of the project.
- Click the Groups & Users tab.
- Click "isOwnerOf".
3.1 Click OK
- In the formula builder box, replace "Project" with "#project".
- Click OK.
4. Hide From Everyone Except Members of a Particular Group
This visibility rule will hide a tag, custom field, or grouping from all users unless they are members of the specified group.
- Click the Groups & Users tab.
- Click "inGroup".
- Click the Objects tab.
Note: There are two different options for InGroup. The first, inGroup(User, Group), is used to determine whether a particular user is a member of the specified group, and the second, inGroup(Group), determines whether the current user is a member of the specified group.
4.1 Click OK
- From the Groups drop-down menu, select the name of the group.
- In the formula builder box, place your cursor inside the word "Group" inside the curly brackets.
- Click the green plus sign.
- Click OK.
5. Viewable by Anyone, Only Editable by Someone in a Particular Role
This visibility rule will make a tag, custom field, or grouping visible to all users; but only allows users assigned to a particular role on the project to edit it.
- Click in the formula builder box and type "#viewing OR ".
- Click the Groups & Users tab.
- Click "inRole".
- Click the Objects tab.
Note: There are two different options for inRole. The first, inRole(User, Project, Role), is used to determine whether a particular user is assigned to the specified role for the given project, and the second, inRole(Project, Role), determines whether the current user is assigned to the specified role for the given project.
5.1 Click OK
- In the formula builder box, replace "Project" with "#project".
- From the Roles drop-down menu, select the name of the role.
- Place your cursor inside the word "Role" inside the curly brackets in the formula builder box.
- Click the green plus sign.
- Click OK.
6. Hide Until the Second Phase of a Gated Project is Completed
This visibility rule will hide a tag, custom field, or grouping from all users until a specified phase of a gated project is completed.
- Click the Projects tab.
- Click "phaseStatus".
- Click the Objects Tab.
Note: Gated project phase numbering starts with the number 1.
6.1 Click OK
- In the formula builder box, replace "Project" with "this".
- In the formula builder box, replace "Number" with the gated project phase number.
- Type "==" after the formula.
- From the Statuses drop-down menu, select "Completed".
- Click the green plus sign.
- Click OK.
7. Hide From External Idea Submitters
This visibility rule can be used specifically for tags, custom fields, or groupings on ideas and will hide the selected tag, custom field, or grouping from external idea submitters.
- Click the Groups & Users tab.
- Click "isLoggedIn".
- Click OK.
8. Hide from Everyone Except Administrators and The Current User
This visibility rule can be used specifically for tags, custom fields, or groupings on user profiles and will hide the selected tag, custom field, or grouping from all users except Administrators and the current user.
- Click the Groups & Users tab.
- Click "isAdmin".
- After "isAdmin()", type " OR #currentUser==#user".
- Click OK.
Note: There are two different options for isAdmin. The first, isAdmin(User), is used to determine whether a particular user is an Administrator, and the second, isAdmin(), determines whether the current user is an Administrator.
9. Hide From Everyone
This visibility rule can be used specifically to retire tags, custom fields, or groupings without deleting them and will hide the selected tag, custom field, or grouping from all users.
- Click in the formula builder box and type "false".
- Click OK.