Cascading Enumerations

Cascading of enumerations is helpful for adding a dependency from one enumeration type to another. For example, an enumeration ZBKS.Sport lists all the supported Sports, and ZBKS.Position lists various type of player's position in a Sport.

ZBKS.Sport has values Football, Basketball. ZBKS.Position has values Goalie, Guard, Center, Forward, Defender. Using this feature, the value for the Position enum field can be restricted by the selected value of the Sport field.

The following data models needs to be populated to enable a Cascading Enumeration:


  • EnumDependency

    This model is used to define the enum dependency and the list of permitted enums to be available for the parent enumeration.

    Field

    Description

    EnumType

    Enumeration type by which we need to enforce restriction e.g. ZBKS.Sport. REQUIRED.

    EnumName

    Enumeration name from EnumType e.g. Football. REQUIRED.

    DependendentEnumType

    Enumeration type for which values need to be restricted e.g. ZBKS.Position. REQUIRED.

    DependentEnumName

    Enumeration name from DependendentEnumType e.g. Goalie. REQUIRED.

    Enterprise

    Owning enterprise of the dependency. If null then ValueChain scope is used.

  • EnumFieldDependency

    This model is used to define the String Enumeration field dependency which Platform checks when rendering the fields on UI.

    Field

    Description

    ModelLevel

    Model Level Type e.g. ZBKS.Athlete. REQUIRED.

    FieldName

    String Enumeration field name on ModelLevel e.g. Sport. REQUIRED.

    DependentFieldName

    Dependent String Enumeration field name on ModelLevel e.g. Position. REQUIRED.

    Enterprise

    Owning enterprise of the field dependency. If null then ValueChain scope is used.

These models can be populated either by inbound interface or by administrative UI. For EnumDependency and EnumFieldDependency, the inbound interfaces PLT.EnumDependency_IB(1.0) and PLT.EnumFieldDependency_IB(1.0) can be used.

For modifying from the administrative UI, add the following to the RoleTypeUiConfig of an appropriate role:

<WebActionGroupRef name="EnumDependency" module="PLT"/>

Enum Dependecies Report


images/download/attachments/144835168/enum_dependecies_report-version-1-modificationdate-1645042584000-api-v2.png

Enum Dependecies Form page

images/download/attachments/144835168/enum_dependecies_crud-version-1-modificationdate-1645042595000-api-v2.png



Enum Field Dependencies Report

images/download/attachments/144835168/enum_field_dependecies_report-version-1-modificationdate-1645042605000-api-v2.png



Enum Field Dependencies CRUD page


images/download/attachments/144835168/enum_field_dependecies_crud-version-1-modificationdate-1645042615000-api-v2.png

All enumeration values (whether static or dynamic), along with variation information, are stored in ENUMERATION table.