---
schema_version: "1"
id: 42fc97f95c476dbeb853d406a80775a3b077514aab2e85ee5a575b8a82c2170f
title: Use the Conditional View Property to Conditionally Display Elements (Managed Package)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_conditionally_display_elements_using_the_conditional_view_property.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_conditionally_display_elements_using_the_conditional_view_property.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 21f8ef2ba2f2ccf4e2d524f091110959acec2b390b12dd602617061820a95c1e
description: For the managed package runtime, every step, block, or element supports at least one Conditional View. Conditional Views allow you to hide the element or the group of elements contained in a block or step based on certain conditions. Elements contain up to three conditional view options depending on the type of element. For example, an Action outside of a Step doesn’t have a Read-Only option since the action isn’t visible.
products:
  - Omnistudio
release: "264"
---
# Use the Conditional View Property to Conditionally Display Elements (Managed Package)

For the managed package runtime, every step, block, or element supports at least one Conditional View. Conditional Views allow you to hide the element or the group of elements contained in a block or step based on certain conditions. Elements contain up to three conditional view options depending on the type of element. For example, an Action outside of a Step doesn’t have a Read-Only option since the action isn’t visible.

![Managed Package app icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/resources-global/_corporate/images/managedpackageicon.png) This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see [Omnistudio Help](https://help.salesforce.com/s/articleView?id=xcloud.os_omnistudio_standard.htm&language=en_US).

When you hide an element in an Omniscript, Omnistudio sets the contents of the element to null in the data JSON. Consider this behavior if your Omniscript references the hidden field. For example, suppose a Set Error element assesses whether a Text element is filled before proceeding to the next page. If the Text element is conditionally hidden, the Text element value is null, and the error is set.

1. From the **Properties** section on the element, go to the **Conditional View** section.
2. Select a **Condition Type** from the dropdown menu.
    
    <table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
            <colgroup>
              <col>
              <col>
              <col>
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d191033e76">
                  <p style="margin-bottom:0;">LWC Omniscript Designer Conditions</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d191033e82">
                  <p style="margin-bottom:0;">Classic Omniscript Designer Conditions</p>
                </th>
                <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d191033e88">
                  <p style="margin-bottom:0;">Description</p>
                </th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="LWC Omniscript Designer Conditions" class="slds-cell-wrap" style="vertical-align:top;" headers="d191033e76 ">
                  <p style="margin-bottom:0;">
                    <strong class="uicontrol">Show Element if True</strong>
                  </p>
                </td>

                <td data-label="Classic Omniscript Designer Conditions" class="slds-cell-wrap" style="vertical-align:top;" headers="d191033e82 ">
                  <p style="margin-bottom:0;">
                    <strong class="uicontrol">Hide element if false</strong>
                  </p>
                </td>

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d191033e88 ">
                  <p>The element renders only if the conditional is true. If the
                    conditional is false, the element is hidden from the UI.</p>
                  <p style="margin-bottom:0;">For
                    blocks, this condition type is the only one available.</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="LWC Omniscript Designer Conditions" class="slds-cell-wrap" style="vertical-align:top;" headers="d191033e76 ">
                  <p style="margin-bottom:0;">
                    <strong class="uicontrol">Disable Read Only if True</strong>
                  </p>
                </td>

                <td data-label="Classic Omniscript Designer Conditions" class="slds-cell-wrap" style="vertical-align:top;" headers="d191033e82 ">
                  <p style="margin-bottom:0;">
                    <strong class="uicontrol">Set element to read only if false</strong>
                  </p>
                </td>

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d191033e88 ">
                  <p>Disables Read Only on an element if the conditional is true. If the
                    value is false, the element becomes Read Only.</p>
                  <p style="margin-bottom:0;">Beginning with Vlocity Insurance and Health Spring '20, this
                    Condition Type takes priority over the Read Only property in the
                    element.</p>
                </td>

              </tr>
              <tr class="">
                <td data-label="LWC Omniscript Designer Conditions" class="slds-cell-wrap" style="vertical-align:top;" headers="d191033e76 ">
                  <p style="margin-bottom:0;">
                    <strong class="uicontrol">Set Element to Required if True</strong>
                  </p>
                </td>

                <td data-label="Classic Omniscript Designer Conditions" class="slds-cell-wrap" style="vertical-align:top;" headers="d191033e82 ">
                  <p style="margin-bottom:0;">
                    <strong class="uicontrol">Set required element to optional if false</strong>
                  </p>
                </td>

                <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d191033e88 ">
                  <p>The element becomes required if the condition is true.</p>
                  <p style="margin-bottom:0;">Beginning with Vlocity Insurance and Health Spring '20, this
                    Condition Type takes priority over the Required property in the
                    element.</p>
                </td>

              </tr>
            </tbody>
          </table>
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)
    
    Note If a condition type isn't listed for an element, it isn't supported. Adding it using the JSON editor doesn't work.
3. Choose the logical operator for the group (AND or OR). The AND operator requires that all conditions are met. The OR operator requires that at least one condition is met.
4. Click **Add Condition**.
5. In the left operand, enter the name of the element in plain text.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/images/icon_note.png)
    
    Note
    
    If the element is repeatable, enter the name of the element followed by |n, where n is the nth repeated element. For example, if Age is repeated, Age|2 refers to the second instance of the repeated element.
6. In the right operand, enter one of these syntax types:
    
    - If the element type is Text, enter the string in plain text.
        
        ![image](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/os_text_conditional.png)
    - If the element type is **Checkbox** or **Disclosure**, enter **true** or **false**.
    - If the element type is **Number**, enter a number.
        
        ![image](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/os_number_conditional.png)
    - If the element type is **Select** or **Radio**, type in the name of the option in plain text—for example, **Yes** or **No**.
    - If the element type is **Multi-Select**, enter a semicolon-separated string—for example **Ind** | **;** | **Small**.
    - If the element type is **Date**, **Time**, or **Date/Time**, enter a value in **ISO format**:
        
        - Date—2014-10-01T07:00:00.000Z (Wed Oct 01 2014 00:00:00 GMT-0700 (PDT)
        - Date/Time—1970-01-02T06:19:00.000Z (Tue Feb 17 2015 22:20:03 GMT-0800 (PST))
        - Time—2015-02-21T00:09:40.270Z (Thu Jan 01 1970 22:19:00 GMT-0800 (PST))
    - The right operand supports merge fields, for example `Name = %contactLastName%`.
        
        ![image](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/os_merge_conditional.png)
7. Beginning with Vlocity Insurance and Health Summer '20, in the canvas, click the **Hide Conditional Elements** checkbox to hide all of the conditional elements in the Omniscript. The conditional elements are marked with a yellow eye icon.
    
    ![LWC OmniScript Designer's Hide Conditional Elements checkbox and a conditional element displaying the yellow eye icon.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/hide_conditional_elements.png)
8. In the canvas, click the **Hide Conditional Elements** checkbox to hide all of the conditional elements in the Omniscript. The conditional elements are marked with a yellow eye icon.
    
    ![LWC OmniScript Designer's Hide Conditional Elements checkbox and a conditional element displaying the yellow eye icon.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio_for_managed_packages-264-0-0-production-enus/aa2554ec-624a-4ee6-8da4-6435670e6e62/omnistudio_for_managed_packages/images/hide_conditional_elements.png)

- **[Running Validation with onChange (Managed Package)](https://help.salesforce.com/s/articleView?id=xcloud.os_running_validation_with_onchange.htm&release=264.0.0&type=5)**  
    For the managed package runtime, beginning with Vlocity Insurance and Health Winter '20 and Vlocity CME Winter '20, LWC Omniscripts run validation when a user clicks out of a field by using the onBlur function.