**Source URL:** https://general.veevavault.dev/safety/mdl/component-types/layoutrule

# Layoutrule

**Class:** `metadata`

Layout rules streamline the data entry process by dynamically hiding irrelevant fields and sections on an object record detail page based on business needs.

Learn about [Configuring Layout Rules in Vault Help](https://platform.veevavault.help/en/lr/51632).

| Attribute | Metadata | Description |
| --- | --- | --- |
| `displayed_as_required_fields` | Type: String Max length: 1500 Multi-value | Lists the fields Vault will display as required (with yellow background color and "\*") when the layout rule evaluates to true. |
| `displayed_as_readonly_fields` | Type: String Max length: 1500 Multi-value | Lists the fields Vault will display as read-only when the layout rule evaluates to true. |
| `hide_controls` | Type: String Max length: 1500 Multi-value | Indicates the custom control to hide in the layout rule. |
| `hide_fields` | Type: String Max length: 1500 Multi-value | Indicates the fields to hide in the layout rule. |
| `hide_sections` | Type: String Max length: 1500 Multi-value | Indicates the sections to hide in the layout rule. |
| `hidden_pages` | Type: String Max length: 1500 Multi-value | Lists the pages Vault will hide when the layout rule evaluates to true. |
| `hide_layout` | Type: Boolean | If set to `true`, Vault hides this layout when the layout rule evaluates to true. |
| `focus_on_layout` | Type: Boolean | If set to `true`, Vault displays this layout when the layout rule evaluates to true. |
| `expression` | Type: String **Required** Max length: 3900 | A valid expression. |
| `active` | Type: Boolean **Required** | Indicates whether the component is active. |
| `order` | Type: Number | The relative order of the layout rules on the *Layout Rules* list page. |
| `description` | Type: String Max length: 255 | A general description of the Layout Rule. When using a `RECREATE` or `ALTER` command to update an existing layout rule that has a value set for this attribute, including the attribute with a null value clears the value. If the `description` attribute is not included in the `RECREATE` or `ALTER` command, the current value remains unchanged. |
| `label` | Type: String **Required** Max length: 40 | UI-friendly string in the Vault’s base language. |

### Supported Operations

| Operation | Support |
| --- | --- |
| Create | Yes |
| Recreate | Yes |
| Alter | Yes\* |
| Drop | Yes |
| Rename | Yes |
| Describe | Yes |
| Generate Recreate | Yes |
| Queryable | No |

**Notes:**

*   **Alter:** MDL Operation may not be supported for some multi-value attributes.

---

**Previous:** [Layoutprofile](/safety/mdl/component-types/layoutprofile)  
**Next:** [Lifecyclestatetype](/safety/mdl/component-types/lifecyclestatetype)