Dynamic enumeration

See also: Any dynamic enumeration

Resolver – Abstract

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


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

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

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

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

Configuration

The Auswahlfeld/Combobox element allows static single selection for values from all dynamic enumerations (see Dynamic 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 dynamic enumeration value, e.g. 'French'.

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

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

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

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

Scenario

Configuration

Dynamic 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 dynamic enumeration of the same name as the context for the value configuration of the compare value (right).

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

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

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

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

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

Reference to the dynamic 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 dynamic enumeration.

  • Instead of the Dynamic enumeration resolver, the Any dynamic 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 Dynamic 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/128387064/image2023-1-11_8-0-57-version-1-modificationdate-1676010823391-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 dynamic enumeration, a Dynamic enumeration resolver with this data or enumeration type is automatically suggested for the compare value (right).