Enumeration

See also: Any enumeration

Resolver – Abstract

Purpose: Returns a statically determined enumeration value (DynamicEnum) from an enumeration determined by the context.

images/download/attachments/201673362/image2023-1-11_7-55-5-version-1-modificationdate-1746778132569-api-v2.png

IMPORTANT◄ All resolvers for Static values ignore the input value. Within a resolver chain (see Chained resolver) this prevents the processing of all preceding resolvers (if any).

The Enumeration resolver returns a statically determined enumeration value (DynamicEnum) from a enumeration determined by the context.

It appears by default as a suggestion for value configurations when the context refers to the one particular enumeration (see Enumerations).

Configuration

The Auswahlfeld/Combobox element allows static single selection for values from all enumerations (see Enumerations).

Its search function looks for matches between the text input and the labels listed in the dropdown for the enumeration values. The label includes the following components:

  • The localization for the enumeration value, e.g. 'French'.

  • The internal name of the enumeration value, e.g. fr

NOTE◄ Unlike the Any enumeration resolver, the label omits the localization for the enumeration given by the context.

images/download/attachments/201673362/image2023-1-11_7-56-54-version-1-modificationdate-1746778132571-api-v2.png

IMPORTANT◄ Unlike the Any enumeration resolver, the Enumeration resolver cannot be specifically added to a value configuration via a context menu. If an existing value configuration refers to a enumeration value as a static value, then this automatically appears in the configuration either as a Enumeration resolver or as an Any enumeration resolver, depending on the possibly changing context:

Scenario

Configuration

Enumeration (here: Locale) is uniquely defined by the context:


  • The left side of the Set value event action defines a Variable (myLocale) as the target of the assignment, whose Class Locale specifies the enumeration of the same name as the context for the value configuration of the compare value (right).

  • By default, the Enumeration resolver automatically appears for the value configuration on the right, offering only enumeration values from the enumeration Locale as options.

  • In the example, the Locale 'English' (en) was selected as the value.

images/download/attachments/201673362/image2023-1-11_7-58-46-version-1-modificationdate-1746778132573-api-v2.png

▼ The appearance changes automatically depending on the selection for the Class of the Variable (left) ▲

images/download/attachments/201673362/image2023-1-11_7-59-7-version-1-modificationdate-1746778132576-api-v2.png

Reference to the enumeration is not (any longer) guaranteed after modification:


  • On the left side of the Set value event action, the selection for the Class parameter has been removed from the configuration for the Variable. The context for the compare value configuration (right) no longer refers to a specific enumeration.

  • Instead of the Enumeration resolver, the Any enumeration resolver appears immediately, recognizable by the appearance of the label, in which the localization for the enumeration name (here: Locale) appears before the localization for the enumeration value.

  • If the Class Locale matching the enumeration value is selected on the left, the Enumeration resolver appears again on the right (as above).

Example

An association criterion is considered to pass exactly when the Current locale is 'French' in the context of a session. Whether a country-specific language selection (fr_CA, fr_FR or fr_CH) is present is ignored.

images/download/attachments/201673362/image2023-1-11_8-0-57-version-1-modificationdate-1746778132578-api-v2.png

  • In the context of an Entity property rule, the Current locale resolver is configured first on the left side, for which the Locale without country option is checked here.

  • As soon as the compare type Equals is selected afterwards, the value configuration with the compare value appears on the right.

  • Since the return value for the Current locale (left) uniquely refers to the Locale data type defined by the enumeration, a Enumeration resolver with this data or enumeration type is automatically suggested for the compare value (right).