Articles in this section
Configuring Dependent Fields and Blocks for Modules
Table of Contents
With Dependent Fields and Blocks, you can define dynamic business rules at the field level. 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 working clearly.
Dependent Fields and Blocks is supported only in the following screens:
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
We will explain the functionality in a bottom-up approach with the following diagram:
- Firstly, the controller (Trigger) field is activated.
- Next, the specified conditions are checked and matched with the Trigger field.
- Lastly, based on the access rules, the Dependent Fields and Blocks are shown.
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.
- Log in to your CRM account.
- Click the User Menu on the top right corner of the screen.
- Click Settings.
- Go to Module Management.
- Click Module Layouts & Fields.
- Select the module for which you want to configure dependent fields.
- 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.
- Click the +New Dependency button.
- Click the drop-down under the Dependent Fields/Block column.
- Select a block or field.
- 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.
- Click the drop-down under the Access column.
- 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.
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.
- Click the field drop-down under the Condition column.
- Select a field. Only picklists and checkboxes fields will appear here.
- Click the operator drop-down.
- Select either equals or Not Equals.
- Enter the picklist value in the text field.
- Click Save to save the dependency.
You can edit or delete an existing dependency by hovering over the dependency.
Handy Hint: If you see a icon in the List View, it represents that the field is not shown due to a dependency rule.
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.