Page tree
Skip to end of metadata
Go to start of metadata

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.

Terminology

  • 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.

  1. In the Field wizard, navigate to the Options tab. Scroll down to find the option Make the visibility of this field conditional.
  2. Click Add Condition to open the condition editor.
    1. From the drop-down, select the field that controls this field’s visibility, the parent field.
    2. Select the values that will allow this field to appear on layouts. Hold down Ctrl to select multiple values for a condition.
    3. Click Finish to return to the field wizard.
  3. 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.
  4. To modify an existing condition, click the edit icon .
  5. To delete an existing condition, click the delete icon .
    1. To remove all existing conditions for visibility dependence, click Remove All.
  6. 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.
  7. Click Finish to apply your changes and return to the Table wizard.

Use Case

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:

Figure 1. Contract End Date will appear if either condition is met, set on the field wizard Options tab.

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.

Notes

  • 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.

All Conditions

Any Condition

Setting Visibility Dependence with a Saved Search

In addition to setting visibility dependence based on the value in a field, you can also configure visibility dependence so a field is only visible when a saved search finds a given record. This allows you to create more powerful conditions for visibility dependence.

For example, maybe you want to make the Contract Notes field visible only when the Contract Amount field is between $10,000 and $50,000. To accomplish this, you can use a background table with a few fields, as well as a linked field, an Update Fields action, and a saved search in the Contracts table, which together set a trigger field. The trigger field allows you to determine the visibility of the Contract Notes field.

Let's see how you can configure the previous example by using the instructions below. If you have a different use case, you can substitute your own search condition, fields, and other items where relevant.

Create the Background Table

Begin by creating a background table to hold the record and the necessary fields. Two fields define the numeric range that the saved search will later use, and a third field acts as the trigger field for the visibility dependence.

  1. Go to Setup > Tables and click New. The Table wizard opens.
  2. Enter "Numeric Range" for the table's name.
  3. Click the Fields tab.
  4. Create a Choice field to act as the trigger field:
    1. Hover over New and select Choice. The Field wizard opens.
    2. On the General tab, enter "Show Contract Notes" for the Field Label.
    3. Select Yes/No for the choice list.
    4. Click Finish.
  5. Create the fields that the saved search will use, which in this case are two Currency fields:
    1. On the Fields tab, hover over New and select Currency. The Field wizard opens.
    2. On the General tab, enter "Start Point" for the Field Label.
    3. Click the Display tab, enter "$" for the Currency Symbol, and choose to always show 2 decimal digits.
    4. Click Finish.
    5. Repeat the previous four steps to create a second Currency field, but enter "End Point" for the Field Label.
  6. In the Table wizard, click the Layout tab and add the fields you created anywhere on the layout.
  7. Click Finish to create the table.
  8. Create a record in the table and set each field you created:
    • Choose Yes for the Show Contract Notes field.
    • Enter 10,000 for the Start Point field.
    • Enter 50,000 for the End Point field.
  9. Click Save.

Create the Link to Selected Fields from Other Table

Next, create a Link to Selected Fields from Other Table in the Contracts table that links to the ID and Show Contract Notes fields in the Numeric Range table.

  1. Click Setup Contracts on the left pane. The Table wizard opens.
  2. Click the Fields tab.
  3. Create and configure the Link to Selected Fields from Other Table:
    1. Hover over New and select Link to Selected Fields from Other Table. The Field wizard opens.
    2. On the Table tab, select the Numeric Range table.
    3. Click the Fields tab.
    4. Select both the ID field and the Show Contract Notes field.
    5. Rename the ID field to Numeric Range ID. Keep the same name for the Show Contract Notes field.
    6. Click Next and then click the Display tab. We'll come back to the Options tab after creating the field.
    7. Select the input aid for each field in the linked set:
      • For the Numeric Range ID field, select Hyperlinked View Only.
      • For the Show Contract Notes field, select Plain Text View Only.
    8. Click Finish. You're returned to the Fields tab of the Table wizard.

Configure the Default Value

Now that the linked set is created, configure the behavior for its default value. This is where you use an Update Fields action and a saved search to find the record in the Numeric Range table, which sets the Show Contract Notes trigger field.

  1. Edit the linked set you just created and click the Options tab.
  2. In the "Set default value..." area, click Create Action. The Actions wizard opens.
  3. Click Create Update Fields Action. The Update Fields Action wizard opens.
  4. Configure the Update Fields action:
    1. On the General tab, enter "Set Show Contract Notes Field" for the Action Name.
    2. Click the Fields tab and select the Numeric Range ID field.
    3. Click the Values tab and select the "Use the [search name] search..." option. 
    4. Click Create New Search. The Saved Search wizard opens.
      1. On the General tab, add a Simple filter where the Start Point field is less than or equal to the Variable $contract.contract_amount.
      2. Add a second Simple filter where the End Point field is greater than or equal to the Variable $contract.amount_amount. When you're finished, the saved search should look like this:
      3. Click the Options tab and enter "LF: Show Contract Notes Search" or similar for the name of the saved search.
      4. Click Finish. You're returned to the Values tab of the Update Fields Action wizard.
    5. Make sure the "Use the [search name] search..." option is selected, choose the saved search you just created, and confirm the first sub-option is selected.
    6. Click Finish, make sure the action you just created is selected, and then click Finish again in the Actions wizard. You're returned to the Field wizard.
  5. In the "Set default value..." area, select the "run the [action name] action..." option, make sure the Set Show Contract Notes Field action is selected, and then select the Contract Amount field in the second drop-down field.
  6. Click Next and then click Finish. You're returned to the Table wizard.
  7. Click the Layout tab and add the fields in the linked set to the layout. It's often a good idea to add fields like these to the Background Fields section of the History tab.

Create the Contract Notes Field

Next, create and configure the Contract Notes field to use visibility dependence.

  1. In the Table wizard, click the Fields tab, hover over New, and select Text.
  2. Enter "Contract Notes" for the Field Label.
  3. Click the Options tab, go to the "Make the visibility of this field conditional" section, and click Add Condition.
  4. Select the Show Contract Notes field, choose the Yes value, and click Finish.
  5. Click the Display tab and set two display options:
    1. For the Width of Input Field, enter 50.
    2. For the Height of Input Field, select multi-line 3 rows high.
  6. Click Finish. You're returned to the Table wizard.
  7. Click the Layout tab and add the field to the layout.
  8. Click Finish.

Test the Visibility Dependence

Lastly, test that the visibility dependence works as intended.

  1. Open a record in the Contracts table.
  2. Enter a value between 10,000 and 50,000 in the Contract Amount field.
  3. Confirm that the Contract Notes field appears.
  4. Change the value in the Contract Amount field so that it's less than 10,000 or greater than 50,000.
  5. Confirm that the Contract Notes field is no longer visible.

Tab Visibility

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.