Visibility Dependent Fields
Conditional field visibility simplifies the user experience by hiding/showing fields on the record form only when they are needed. Visibility dependence can be based on one or more conditions that combine to determine whether the field is visible. Each condition is based on a native or linked choice or multi-choice field having certain values. You can choose whether to show the field if all conditions are met or if any of the conditions is true.
Dependent field – A field whose visibility is controlled by the values held in one or more other fields – the parent fields – in the table.
Parent field – A field whose values control the visibility of a dependent field. Parent fields are choice fields, multi-choice fields, or linked multi-/choice fields from other tables.
Condition – Conditions are the set of allowed values in the parent field that cause the dependent field to appear. The condition editor is a pop-up window where you select fields and values.
Setting Visibility Dependence Conditions
To begin, Edit the dependent field by navigating to Setup Table > Fields tab > Edit field.
- In the Field wizard, navigate to the Options tab. Scroll down to find the option Make the visibility of this field conditional.
- Click Add Condition to open the condition editor.
- From the drop-down, select the field that controls this field’s visibility, the parent field.
- Select the values that will allow this field to appear on layouts. Hold down Ctrl to select multiple values for a condition.
- Click Finish to return to the field wizard.
- To add another condition, repeat step 2. There is no specific limit on the number of conditions, other than the number of available parent fields.
- To modify an existing condition, click the edit icon .
- To delete an existing condition, click the delete icon
- To remove all existing conditions for visibility dependence, click Remove All.
If multiple conditions are set, choose whether the field should be shown if All conditions are met, or if Any of the conditions are met.
- Click Finish to apply your changes and return to the Table wizard.
Let’s consider an example in contract management. Suppose the Contract table contains a date field, Contract End Date, which should be visible if the Renewal Type field has the value Auto-Renewing, Notify Staff to Renew, or One time contract. Contract End Date should also be visible if the Status is Cancelled, regardless of the Renewal Type.
To meet this requirement, add the two conditions on the Options tab of the Field wizard – one based on the Status field, a second based on the Renewal Type field – and choose the intersect option, 'Any of the conditions are met'. Note that in earlier releases of Agiloft, there was no way to do this without creating a third choice field, for example, Show End Date?, that was set by a rule based on the values of the first two fields, Renewal Type and Status.
Now, we can make dependent fields visible if all or any of several conditions is met:
As with other field settings, System Admins or Table Admins can set visibility dependencies, provided their group has admin access to the tables containing the affected fields.
Required Field Permissions
In order to see a visibility dependent field, users must have view permission for the dependent field itself. In addition:
- When a single visibility condition is set: Users must have view permission for the field that controls visibility, the parent field.
- When “all” of multiple conditions must be met: Users must have view permission for all of the parent fields.
- When “any” of multiple conditions must be met: Users must have view permission for at least one of the parent fields which is “true,” i.e., which is currently meeting the condition and allowing the dependent field to appear.
- It is not necessary for a parent field to appear on the layout in order for a dependent field to recognize its value.
- If any of the parent fields is itself hierarchically dependent, users must have permission to view the parents of those parent fields, i.e. the “grand-parent” fields.
Multiple Visibility Condition Permission Examples
The graphic examples below show how different combinations of view permissions and true conditions affect users’ ability to see a dependent field.
If a user does not have permission to view any of the fields in a record tab, the tab will automatically disappear from view. If the visibility conditions are satisfied for even one field in a tab, the tab will be visible in the record layout. If the visibility conditions for any field are changed so that the user can view it, the tab will automatically become visible for them.