Home  >   Articles   >  Settings - Create Dynamic Fields and Layouts
Articles in this section

Settings - Create Dynamic Fields and Layouts

B
Bindu Rekha Babu
11 Aug, 2020 - Updated 1 year ago
Table of Contents

Dynamic business rules are defined at a module level and impact detail and edit views of a record keeping the clutter out of the views. Additionally, rules can be set to mark a field as mandatory or read-only.

Dependent Fields
Click the icon to watch the video.

Dynamic Fields are supported in List View, Detail View, Edit View and Inline Edit.

Example: “A Customer sells Insurance (Product A and Product B), he has 120 custom fields which are related to Product A and there will be 120 custom fields for Product B. The customer doesn’t want to see the custom fields which are related to Product A when he is updating the Product B details.

When the customer selects Product A from picklist or a checkbox field, the fields which are related to Product A should be shown and when he selects Product B, the fields related to Product B only should be shown.”

Prerequisites for setting up dynamic fields or blocks

  • Define the blocks and fields in the layout using Module layout editor.
  • Define the picklist or checkbox field that will be used as trigger field in dependency rules
  • Go to Dependent fields/block tab of a module to define dependency rules

Dependent Fields & Block Rules

Rules Description & Example
Set Visibility This action is to show or hide a field(s) or a block when conditions are met. If all fields are hidden, then the corresponding block also gets hidden.
Example: If a Lead is a B2C case, show fields relevant to a consumer, else show fields relevant to an Organization.
Set a Mandatory field This action is to conditionally make a field mandatory.
Example: If a Case is closed, case resolution field is shown and needs to be filled by the agent closing the case.
Set Read only This action is to make a field(s) read-only when conditions are met.
Example: If an Opportunity stage is Quote approved or closed, make Opportunity amount read-only.

Adding a dependent block

Follow these steps to add a Dependent Block

  1. Click New Dependency
  2. Select Dependent Field/Block (to be visible on selection). Example: Address Details
    alt text

  3. Select Access Control
    alt text

  4. Select Condition - Select Salutation equals ‘Mr.’ (You can also choose not equals condition) from drop-down. You can have multiple conditions on a block.
    alt text
    alt text

  5. Click Save

The flow of the dependency is as below

If condition (Salutation equals ‘Mr.’)
Access: Show
Dependent Block: Address details

Adding a child dependent field within a block

  1. Click Edit icon below the dependent block
    alt text

  2. Click New Field Dependency

  3. Select Dependent Field (Mailing Street)
    alt text
  4. Select Access Control and add the condition as Mode of Contact + equals = PrimaryEmail
    alt text
  5. Add another action on the Dependent Field - If Contact Type equals ‘Sales Qualified Lead’ show Mailing Street field as Read Only.
    alt text
  6. Click Save

Adding a dependent field

Let’s consider adding a dependent field for Opportunity module. Follow these steps to add a Dependent Field

  1. Click New Dependency
  2. Select Dependent Field (to be visible on selection). Example: Lost Reason
  3. Select Condition: Select Sales Stage equals ‘Closed Lost’. You can have multiple conditions.
  4. Select whether mandatory

    • Show (Read + Write) & Mandatory - Show field or block and mark mandatory only if the conditions are met.

    • Mandatory - Show field or block always and conditionally set as mandatory in record view.
      For example, Show Lost Reason Field always but if Sales Stage = Closed Lost, set Lost Reason field as mandatory.
      alt text

  5. Click Save

Note!
Dependent fields will slow list views.
If List view columns include dependent fields, then it could take more time to load the list.

Dynamic Field allows you to choose picklist field and checkbox field for triggering.

alt text

Note! Conditional mandatory rules will not adhere if Fields are mandatory in module levels.
**Access Control: ** Show (Read + Write) or Show (Read) only, select checkbox to make it as a mandatory field work only on field level

Exceptions

  • Dependent field cannot be a trigger field.
  • Trigger field is first outside the block and then moved inside the dependent block, dependency will not work and all the fields will be shown.
  • When a trigger field is disabled, the condition will be in a strikeout mode.

Points to remember

  • The alt text icon in the list view represents that the field is hidden due to the dependency rule set.
Was this article helpful?
0  out of  0  found this helpful.
Comments 0
Be the first to comment
© Copyright 2022 Vtiger. All rights reserved.