Configure the Behavior of Polymorphic Segments

The add-in allows edits to global and context-sensitive polymorphic segments in the service editor.

Edits to properties of the polymorphic fields are preserved during polymorphic metadata refresh. See Refresh Polymorphic Business Object Metadata. Prior to version 4.6 of the add-in, global and context-sensitive polymorphic segments were not editable. The behavior of these fields was dynamic and fully determined by the service metadata. During a metadata refresh, the existing metadata was fully discarded in exchange for the updated metadata from the service.

The add-in now allows and tracks edits to some properties of global and context-sensitive fields. During polymorphic metadata refresh, edits are preserved rather than overwritten with updated metadata from the service. Unedited properties are updated from the service as before. Additionally, some properties that are not derived from service data, like Validation Rule, now allow edits in the field editor for polymorphic segments. These values are also preserved during a polymorphic metadata refresh.

To configure the behavior of polymorphic segments, you edit the properties for global and context-sensitive polymorphic segments by navigating to the Business Object Field Editor for their discriminator field (context segment).

  1. Click Manage Catalogs.
  2. In the Manage Business Object Catalogs window, select your catalog and click the Edit Business Object Catalog (Edit Business Object Catalog) icon.
  3. In the Fields tab of the Business Object Editor, select and edit the discriminator field.
  4. In the Business Object Field Editor, the Polymorphic Information tab contains a list of available segments in its Fields tab.

    The segments are grouped by their context ("Global" for global segments or the relevant discriminator value for context-sensitive segments).

    The following properties support change tracking in the Field Editor for global and context-sensitive polymorphic fields. Edits to these values in the designer are tracked by the add-in. During polymorphic metadata refresh, edited properties are preserved. Values of unedited properties are discarded and set to the updated value from the service.

    General Properties Description
    Title

    The name of this field. This value is used in various places, such as for the column header or form field label. This value can be localized.

    Provide a short value that is meaningful to your business users.

    Help Text

    A description of the field intended for business users. This value appears near the title where possible. This value can be localized.

    Provide a brief explanation of what values are expected for this field.

    See Add Help Text to Your Workbook

    Data Type

    The data type for the field, used for encoding and decoding data from the service, as well as data validation and cell formatting.

    Data types include values such as:

    • Boolean
    • Date (no time)
    • Date-Time
    • Integer
    • Number
    • String

    See Supported Data Types.

    WARNING:

    Do not modify the data type without consulting the service owner.
    Description

    An internal technical description for the field.

    This value only appears in the designer. It is not localizable.

    Default Value A default value for the field. See Default Values for Business Object Fields.
    Constraints Properties Description
    Required for update and Required for create

    Ensures a value is provided for the field during create or update:

    • If the check box is selected, the add-in checks that there is a value in the field cell and displays a data entry error if there is no value. The business user won't be able to upload the new or updated row until a value is provided. See Data Validation.
    • If the check box is not selected, the add-in doesn't require a value. The business user can upload the new or updated row without a value for this cell.

    WARNING:

    Don't deselect these check boxes without first consulting with the REST service owner. These properties come from the service metadata and reflect requirements of the REST service.

    If you deselect these check boxes for a field required by the service, the service may return an error, similar to a (400) Bad Request error, if no value is provided.

    See Required Fields.

    Editable on update and Editable on create

    Allows or prevents write operations on the field during create or update:

    • If the check box is selected, the business user can provide a value during create or update.
    • If the check box is not selected, the field cells are set to read-only.

    See Data Validation and Understanding Read-Only Behavior in Managing Data Using Oracle Visual Builder Add-in for Excel.

    Searchable

    Determines if a field can be used in a search.

    Note:

    Global and context-sensitive polymorphic segments do not currently appear in the search editor even if this value is true.
    Required for search

    Determines if a value is required for the field during a search:

    • If the check box is selected, a value must be provided for the field on download. Required fields are indicated by an asterisk (*) in the Search Editor.
    • If the check box is not selected, no value is required.
    Omit from payload if value is empty

    Determines if the field is omitted from the payload if the cell value is empty.

    If the check box is selected, empty values are omitted. See Omit Empty Values During Upload.

    Hide in layouts

    Hides the global or context-sensitive segment when the polymorphic business object is included in a layout.

    • If the checkbox is checked, the segment is not included in any layouts containing its discriminator field
    • If the checkbox is unchecked, the segment is included in any layouts containing its discriminator field

    Note:

    • If the checkbox is checked but the hidden segment is required, upload may fail.
    • This value is driven by the DISPLAYHINT x-hint value in the field's metadata for Oracle ADF REST services.
    • This value is only editable for global and context-sensitive polymorphic segments. It does not appear in the field editor for other types of fields.
    Minimum Length and Maximum Length

    The minimum or maximum length of the value in characters for a string-based field. The value must be a number between 0 and 2147483647.

    If a value is set for one or both of these properties, the add-in checks that the number of characters in the field cell meets the set minimum or maximum value.

    If the value is less than the minimum or greater than the maximum, a data entry error is displayed. The business user won't be able to upload the new or updated row until a value meeting the minimum and/or maximum length is provided. See Data Validation.

    Note:

    Current versions of Excel limit the length of text for a single cell to 32,767 characters. See Excel specifications and limits.

    When these change tracking properties are edited, the control's styling changes to indicate that the value has been altered. The text becomes bold , and a Revert icon (Revert icon) appears inside the control.


    Edited Title, Help Text, and Data Type properties on a polymorphic segment

    To unmark the changes to a particular property and revert the value to the value from the service, click the Revert icon (Revert icon).


    Edited Required for create and Editable on update properties on a polymorphic segment

    Note:

    Manually editing the value back to the old value will not unmark the property as changed. Once a property has been edited, the Revert icon (Revert icon) must be used to undo any changes.

    The following properties are not driven by service metadata. They are editable for global and context-sensitive polymorphic segments and always preserved during metadata refresh. Change tracking is not enabled for these properties, and altering them does not change the style or cause the Revert icon (Revert icon) to appear.

    General Property Description
    Format

    The cell formatting property for the field.

    The default property (Default) indicates that the field uses the standard formatting for the data type, for example, mm/dd/yyyy for date fields.

    To use a different format style, select an option from the list such as Long Date for a date field. This option displays "7/15/2022" as "Friday, July 15, 2022".

    See Choose Field Formats.

    Constraints Property Description
    Primary Key

    Determines if the field is a primary key or is part of a composite primary key for the business object.

    If the check box is selected, the add-in uses the value of this field to uniquely identify business object records.

    Validation Rule and Validation Failure Message See About Field Validation Rules.