Layout rules streamline the data entry process by dynamically hiding irrelevant fields, sections, pages, and layouts on an object record detail page based on business needs. For example, a veterinary clinic could hide all fields and sections related to feline medicine on the patient record page if the patient is a dog.

Layout rules use Boolean expressions to hide or show fields and sections. You can configure up to 50 rules for each layout. Each layout rule can hide one or more fields, sections, pages, controls, layouts, or all of the above.

You can hide layouts when a user is assigned multiple layouts but only one is relevant at a certain point, such as during a lifecycle state. For example, if a record is in a Draft state, use a layout rule to hide all other layouts that aren’t relevant to the Draft state. Used in conjunction with the Focus On rule, the user would only see the layout relevant to the Draft state.

Layout Rules Demo

See below for a video tutorial on how to use layout rules in Vault.

Accessing Layout Rules

You can access the Layout Rules list page in two ways:

  • Navigate to Business Admin > Objects and select an object. From the object record detail page, click the All Actions menu and select Configure Layout. Then click Layout Rules.
  • Navigate to Admin > Configuration > Objects > [Object] > Layouts and select an object layout. Then, click Layout Rules.

Creating Layout Rules

To create a new layout rule:

  1. From the Layout Rules list page, click Create.
  2. Enter a Label for the layout rule. The Name field auto-populates with the value entered in the Label field.
  3. Select Active or Inactive from the Status drop-down menu.
  4. Optional: Enter a brief description in the Description field.
  5. Enter the Layout Rule Expression, which must be a Boolean (true/false) expression. You can use the Fields, Functions, and Operators tabs to search a list of options.
  6. Click Check Syntax. If no errors occur, the layout expression rule is valid.
  7. Select Hide, Display as Required, Display as Read-Only or Focus On from the Effect drop-down.
  8. If Hide is selected, select the Type of item to hide. You can hide individual fields, sections, pages, controls, or the entire layout.
  9. If Display as Required or Display as Read-Only is selected, Field is automatically selected from the Type drop-down.
  10. If Focus On is selected, the Type drop-down is set to Layout.
  11. Select the field, section, page, or control from the Values drop-down. Type an item in the Values field to search for it in the drop-down menu.
  12. Click Save.
  13. Click Layout Editor to return to editing the layout sections and pages.

Layout rules expressions use Vault’s standard expression grammar and return true/false. Vault hides fields, sections, pages, controls, and layouts when expressions return true. Layout rules support all standard field types supported in Vault expression grammar and use the same syntax as formula fields, validation rules, and other expression-based features.

Object type layouts can have rules that are independent of the base object. Layout rules can only use fields from the current object or object type and sections from the current object layout. With the exception of object reference fields, you cannot use related object fields in layout rules.

Layout rules can also use fields referencing the logged-in user. You can configure layout rules to hide fields and sections from individual users or groups of users. For example, a medical clinic could prevent non-clinical staff from seeing patients’ sensitive medical records.

If a layout rule hides all layouts, sections, or pages on an object, an error message displays asking the user to contact their Admin.

If a layout rule hides a field in a two-column section, the fields will rebalance. For example, if a two-column section contains eight (8) fields (four (4) per column), and two are hidden, both columns will rebalance to show three fields each. In addition, if one field is hidden, the left column will show four fields and the right column will show three. Vault also aligns the fields with each other.

About Display Effects

Display effects determine how the layout rule will function in the user interface. The available display effects are as follows:

  • Hide: Allows you to hide layouts, pages, sections, controls, and fields. Use this effect to hide information that is irrelevant to one user but relevant to another. For example, a veterinary clinic could hide a feline distemper vaccine history field if the patient is a canine.
  • Display as Required: Allows you to show fields as required. Use this effect to make a field required for one user while leaving it unrequired for another. This is not a security feature and only applies to the display of the field on the object record detail page.
  • Display as Read Only: Allows you to show fields on an object record layout as read-only. Use this effect to prevent users from mistakenly changing existing field values. This is not a security feature and only applies to the display of the field on the object record detail page.
  • Focus On: Allows you to determine which default layout a user sees when accessing a record detail page. Use This effect when there are multiple layouts on a record and you want a user to see one by default. For example, if a record has a Draft lifecycle state, use Focus On to determine the default layout a user sees when they access the record in its Draft state.

Layout Rule Expression Examples

Layout Rule Configuration

If a layout rule hides all layouts, sections, or pages on an object from a user, an error message will display asking the user to contact their Admin.

If a layout rule is used to hide a field in a two-column section, the fields will rebalance. For example, if a two-column section contains eight (8) fields (four (4) per column), and two are hidden, both columns will rebalance to show three fields each. In addition, if one field is hidden, the left column will show four fields and the right column will show three. Vault also aligns the fields with each other.

Description Field & Field Type Expression
Hide Allergy History section for patients with no allergies Allergies?, Yes/No allergies__c = false
Hide Drinks Per Week field for patients under 21 Age, Number age__c < 21
Hide SSN field from a non-trusted employee User Name, Text @User.name__v = "Kevin"
Hide Feline section, Kitten Health History section, Feline Distemper Vaccine field, Litter Box Problems field, and Hairball field if Veterinary Patient is not a cat Species, Picklist species__c != "cat__c"
Require Email Address field for patients who prefer contact by email. Preferred Contact Method, Picklist preferred_contact_method__c = "Email"
Display Billing Address field as read only if the patient’s billing and shipping address are the same. Same as Shipping, Yes/No same_as_shipping__c = true

Editing & Deleting Layout Rules

To edit or delete a layout rule:

  1. Navigate to Configuration > Objects > [Object] > Layouts and select a page layout.
  2. Click Layout Rules.
  3. From a layout rule’s Actions menu, select Edit or Delete. You can also click a layout rule to open it, and then click the Edit or Delete button.

Layout rules can be standard, system, or custom. Only the rule owner can delete and edit certain attributes of standard and system layout rules, for example, Status or Rule Name. Deleting a page layout will delete all associated layout rules.

Configuring the Layout Rules List Page

If an object has multiple layout rules, Vault applies them in the order they appear on the Layout Rules list page. When you create new layout rules, Vault adds them to the bottom of the list. Sections and fields always appear on the object record detail page if the last rule that references them is false. The last layout rule evaluated on a field, section, or layout takes effect. If the last layout rule is false, the hide effect is not applied, even if rules earlier in the list evaluate to true.

To change the order of layout rules, click Reorder. Drag and drop a rule to its new position and click Save.

You can complete all steps in this article with the standard System Admin or Vault Owner security profile. If your Vault uses custom security profiles, your profile must grant the following permission:

Type Permission Label Controls
Security Profile Admin: Objects: Edit Ability to edit and configure Vault objects in order to create an object record page layout rule.