Assign Conditions to Page Layouts

You can assign conditions to a custom layout that control when the layout is displayed. You can't assign conditions to a standard layout.

Note: The layouts you create are displayed in a table, and the order of layouts in each table is significant. At runtime, Application Composer evaluates the condition or conditions specified in each layout, starting with the first layout listed in the table. The first layout that matches all Type, Role, and Expression conditions is selected for display at runtime. The standard layout is always the last layout in the table, and it can't be deleted or inactivated.

Assign one or more of these conditions to a custom layout.

  • Type

    1. Select the custom layout you want to add conditions to.

    2. Select a record type field value, if a record type field has been created for the object. At runtime, if the value is selected, then this custom layout displays.

      The default value for this condition is ANY, so if you do not specify a Type condition for a layout, then Application Composer views this condition as satisfied when evaluating a layout for display at runtime.

    You can't assign this condition to landing page (list page) custom layouts.

  • Role

    1. Select the custom layout you want to add conditions to.

    2. Select the role; this is the audience that can view this page layout. For example, perhaps only the sales representative can see this custom layout at runtime. Custom roles, which are copies of the predefined roles that Oracle provides for all customers, are displayed by default for you to select. However, you can optionally choose to display predefined roles, as well.

      The default value for this condition is ANY, so if you do not specify a Role condition for a layout, then Application Composer views this condition as satisfied when evaluating a layout for display at runtime.

  • Advanced Expression

    1. Select the custom layout you want to add conditions to.

    2. Click the Calculator icon.

    3. Enter a Groovy expression that controls when this custom layout is displayed.

    You can't assign this condition to landing page (list page) custom layouts.

Tip: In general, it's best to keep a single custom layout, for each page type, condition-free. This way, if no conditions apply at runtime, then at least your users see a generic custom layout. Otherwise, if no conditions apply at runtime, then the standard layout displays.