There are times when it would be ideal for showing different fields or sections on a layout based on field data. For example, if a field for "Issue Type" is selected on a ticket page, it would be nice if a section or field related to capturing more information on "Issue" is displayed. If the field is not selected, then this section or field remains hidden. Layout Rules help you do just these with ease.
The layout rules allow you to define the dependency between related fields based on a user's input in a layout. So, when a user fills in a field, the layout progressively adds more fields or sections based on the users' input. This helps you limit the number of fields that appear on a layout and speed up the process of creating a record.
Let's consider the "Issue Type" field again. When a user selects a Parts transaction on this field, you want to show a part number field. When they choose a Service transaction, you want to show a labor rate. This typically means that when a user submits a ticket for a Parts transaction, the Service transaction-related field should not be displayed although it exists in the layout. You can achieve this type of dynamic layout by creating a layout rule with "Issue Type" as the primary field. Read on to know how you can accomplish this.
Benefits
Here are the three benefits of creating layout rules:
- Control the order in which layout fields are presented to users.
- Eliminate field clutter by limiting the number of fields that appear on a layout.
- Make a field mandatory depending on the value entered in a previous field.
Availability
- Only users with Profile permission to Manage Layouts and Fields can access this feature.
- You can create a maximum of 10 layout rules per department.
Creating Layout Rules
To create a layout rule:
- Click the Setup icon ( ) in the top bar.
- In the Setup Landing page, click Layouts and Fields under Customization.
- Click Layout Rules under the Layouts and Fields sub-menu.
- In the Layout Rules page, select the desired module and the department (when more than one exists) from the drop-down menu.
- Click Create Rule in the upper-right area.
- In the Create Layout Rule pop-up window, do the following:
- Enter a name for the rule.
- Describe the rule.
- Choose a primary field that controls this rule. Example, Issue Type.
- Choose a condition to initiate the rule. Example, Issue Type + is + Parts.
- Click Next.
- In the Layout Rule Editor, the condition specified is pre-populated. So, click Trigger an action.
- Choose from the list of actions. Example, Show Fields.
- In the Create Action panel, specify the field to be shown. In this scenario, Part Number field.
You can specify further conditions and actions as required. Example, Show Sections and Set Mandatory Fields. - Click Done on the right panel.
- Check Apply to Help Center to manage dependencies between fields when tickets are submitted through your help center.
- Click Save.
About Actions
There are three actions that can be triggered when layout rule criteria are met.
- Show Fields: Choose this action when you want specific fields to be shown
- Show Sections: Choose this action when you want specific sections to be shown
- Set Mandatory Fields: Choose this action when you want to make a few fields mandatory
Points to Remember
Here are some points to keep in mind while creating layout rules:
- Following is the split up of the number of conditions you can create within a layout rule.
- 25 Parent Conditions per rule
- 5 Branch Conditions per parent condition
- 5 Criteria per branch condition
- 25 Actions per branch condition
- Layout rules are department-specific. This means, under a single module, say Tickets, you can configure different layout rules on the same field for different departments.
- The [Record] Owner field cannot be chosen as the primary field that controls the layout rule.
- Layout Rules are applied only when users manually create or edit a record.
- Layout rules are not available for records created via import, webforms, and APIs.
- Layout rules cannot be created based on a Multi-select picklist field or a Multi-line field as the primary field.
- Layout Rules cannot be used on the following fields:
- Department Name
- Description
- Resolution
- A primary field used in a layout rule is not available for update from the Mass Actions menu.
- The primary field used in a layout rule must be visible on the Help Center to validate tickets submitted through it.
- A field once specified in action cannot be added again to another rule.
You can rename a layout rule or update its description at any time.
To rename rule:
- Click the Setup icon ( ) in the top bar.
- In the Setup Landing page, click Layouts and Fields under Customization.
- Click Layout Rules under the Layouts and Fields sub-menu.
- In the Layout Rules page, hover your mouse pointer over the rule you wish to rename, click the More icon ( ) and select the Rename option.
- On the Renaming Rule window, update the rule's name and description.
- Click Save.
You can activate or deactivate layout rules at any time. When you deactivate a rule, it is labeled as Inactive. Layout rules can be reactivated, when needed.
To deactivate rule:
- Click the Setup icon ( ) in the top bar.
- In the Setup Landing page, click Layouts and Fields under Customization.
- Click Layout Rules under the Layouts and Fields sub-menu.
- In the Layout Rules page, click the toggle corresponding to the layout rule to OFF.
- Click Deactivate to confirm.
Deleting Layout Rule
Layout rules can be deleted when not in use. When you delete a rule, it will be permanently removed from your help desk and cannot be recovered.
To delete rule:
- Click the Setup icon ( ) in the top bar.
- In the Setup Landing page, click Layouts and Fields under Customization.
- Click Layout Rules under the Layouts and Fields sub-menu.
- In the Layout Rules page, hover your mouse pointer over the rule you wish to delete, click the More icon ( ) and select the Delete option.
- Click Yes, Delete the rule to confirm.
Note:
- When you delete a layout rule, the conditions you have set for the rule will also be deleted.