Home  >   Articles   >  Configuring Dependent Fields and Blocks for Modules
Articles in this section

Configuring Dependent Fields and Blocks for Modules

This article will help you configure dependent fields and blocks in modules.
R
Rashmi Kashyap
20 Nov, 2023 - Updated 11 months ago
Table of Contents

Introduction

You can define dynamic business rules at the field level with Dependent Fields and Blocks. They are activated only when the configured condition is satisfied. Additionally, you can set rules to mark a field as mandatory or read-only.

For example, you can define a condition where the Location field must be revealed only when you fill out the Phone Number field in a record.

Watch a video to understand the process clearly.

 

Note: Dependent Fields and Blocks is supported only in the following screens:

  • Detail View
  • Edit View
  • Mass Edit
  • Workflows (Create record or Update fields action)


Working of Dependent Fields and Blocks

In this section, you will learn about the functionality of Dependent Fields and Blocks in Vtiger CRM. But before you dive into the working of this setting, it is essential that you complete these prerequisites:

  • Set up Blocks and Fields in Module Layouts & Fields > Detail View Layout
  • Define the Picklist or Checkbox fields that will be later used as a Trigger field
Dependent fields will always appear in the same order as defined in the module layout. This order will remain the same even after you edit the fields.

We will explain the functionality in a bottom-up approach with the following diagram:
 
  1. Firstly, the controller (Trigger) field is activated. 
  2. Next, the specified conditions are checked and matched with the Trigger field.
  3. Lastly, based on the access rules, the Dependent Fields and Blocks are shown. 
  4. Each time the condition matches, the dependent field is to be filled by users.

Consider this example.
A customer sells insurance with Product A and Product B. He has 120 custom fields for Product A and 120 custom fields for Product B. The customer’s requirement is straightforward.  They don’t want Product B’s fields to be visible while working on Product A and vice-versa.

Here is the solution.
With the help of Dependent Fields and Blocks, we can achieve the above requirement. When the customer selects Product A from a Picklist or Checkbox field, the fields related only to Product A are shown, and when he selects Product B, the fields related only to Product B are shown.


Configuring a Dependency

Once you understand the functionality, configuring the dependency is quite an easy task. We have divided the entire process into four steps for better understanding. Read on...

Step 1: Accessing the Dependent Fields and Blocks screen

This is the primary step in using which you can go to the Dependent Fields and Blocks screen.

  1. Log in to your CRM account.
  2. Click the User Menu on the top right corner of the screen.
  3. Click Settings.
  4. Go to Module Management.
  5. Click Module Layouts & Fields.
  6. Select the module for which you want to configure dependent fields.
  7. Click the Dependent Fields/Block tab.

Step 2: Adding a new dependency

You can add both block dependency and field dependency here.

If you choose a block dependency, you can add multiple child field dependencies under it. You cannot do the same for a field dependency.

  1. Click the +New Dependency button. 
  2. Click the drop-down under the Dependent Fields/Block column.
  3. Select a block or field.
  4. If you wish to add a child field dependency under a block, click +New Field Dependency

Step 3: Setting the access rules

Once you decide on the dependent blocks and fields, you must specify the user’s action on the field.

  1. Click the drop-down under the Access column.
  2. Choose the access rule. For block dependencies, the default and only option is Show, where we show the block. For field dependencies, you can choose among the following options:
    • Show (Read + Write) - Show the field with a read and write access.
    • Show (Read + Write & Mandatory) - Show the field and make it mandatory with read and write access.
    • Mandatory - Make the field mandatory.
    • Show (Read only) - Show the field with only read access.
 

Note:

  • If you wish to add another action for the same dependency, click +New Action and repeat steps 12 and 13.
  • Fields that are defined as mandatory at the module level (in Detail View Layout) are not affected by the access rules set in Dependent Fields and Blocks. This applies only to Show (Read + Write & Mandatory) and Mandatory access rules.
 

Step 4: Specifying the conditions

Once you add the access rules, you must mention the trigger field and its value. The trigger is a condition that must be satisfied for the dependent fields/blocks to be shown.

  1. Click the field drop-down under the Condition column.
  2. Select a field. Only picklists and checkboxes fields will appear here.
  3. Click the operator drop-down. 
  4. Select either equals or Not Equals.
  5. Enter the picklist value in the text field.
  6. Click Save to save the dependency.
 

Note

  • If you wish to add another condition for the same dependency, click +Add Condition and repeat steps 14-18.
  • You can delete a condition by clicking the Delete icon next to the condition.
 

You can edit or delete an existing dependency by hovering over the dependency.

Handy Hint: If you see the alt text icon in the List View, it represents that the field is not shown due to a dependency rule.


Limitations

Here are a few limitations that you must be aware of:

  • A dependent field cannot be a controller (Trigger) field.
  • If you move the Trigger field to a different block in the Detail View Layout after setting up a dependency rule, you must reset the rule associated with the Trigger field. 
  • When a Trigger field is disabled, the condition will be in a Strikeout mode.
  • Dependent fields will slow the list views. If List View columns include dependent fields, then it could take more time to load the list.
Was this article helpful?
1  out of  1  found this helpful.
Comments 0
Be the first to comment
© Copyright 2023 Vtiger. All rights reserved.