--- title: "Conditional value" slug: "core-conditional-value-resolver" updated: 2026-04-15T13:34:31Z published: 2026-04-15T13:34:31Z canonical: "docs.lobstersoftware.com/core-conditional-value-resolver" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Conditional value *See also:* [If then else](/v1/docs/en/core-if-then-else-actor) (Event action) > [!NOTE] > Value resolver – Abstract > > **Purpose:** Determines the return value based on a case distinction that can be constructed in the same way as the [If then else](/v1/docs/en/core-if-then-else-actor) event action with an arbitrary number of branches. > > > [!TIP] > > Tooltip > > > > - **Usage**: The configuration provides the establishment of an arbitrary number of *branches* for case discrimination, each containing a *rule configuration* and a *value configuration*. Both configurations are optional. > > - The rule configuration defines the condition under which a *branch* is entered. The rules are checked "from left to right" until a *branch* is entered (similar to an [If then else](/v1/docs/en/core-if-then-else-actor) action).A *branch* without *rule configuration* is entered without a check if no previous check is passed. > > - The *value configuration* defines the value that is returned as the return value when a *branch* is entered. > > > > A *branch* without *value configuration* may return "No value" (`$null`). ![images/download/attachments/106962967/image2022-11-23_9-16-9-version-1-modificationdate-1669191369247-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-11-23_9-16-9-version-1-modificationdate-1669191369247-api-v2.png) The [Conditional value](/v1/docs/en/core-conditional-value-resolver) resolver determines the return value based on a case distinction, which can be constructed in the same way as the [If then else](/v1/docs/en/core-if-then-else-actor) event action with any number of *branches*. Unlike an [If then else](/v1/docs/en/core-if-then-else-actor) event action, which is available only in the context of [Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration), the [Conditional value](/v1/docs/en/core-conditional-value-resolver) resolver can be used in all contexts that use *value configurations*. Among other things, the [Conditional value](/v1/docs/en/core-conditional-value-resolver) allows case differentiation within a concatenation of value resolvers, which can enable more compact and transparent configurations in all contexts ([Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration), [Association criteria](/v1/docs/en/core-association-criteria), [Search API](/v1/docs/en/common-search-api), etc.). Example: ![images/download/attachments/106962967/image2022-11-23_10-30-23-version-1-modificationdate-1669195823356-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-11-23_10-30-23-version-1-modificationdate-1669195823356-api-v2.png) Each *branch* of the case distinction links a *rule configuration* (see diamond symbols above) with a value configuration (see trapezoid symbols below). Both configurations are optional: - If the *rule configuration* is omitted, then the *branch* condition is considered to pass by default. - If the *value configuration* is omitted, then the following applies to the "No value" (`$null`) *branch* . The *input value* for the value resolver is passed step by step from left to right to the *branches* of the case discriminator until either the condition configured for a *branch* applies or a *branch* is reached for which no rule configuration exists (see the ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/add(45).svg) icon on the right in the image). The *value configuration* for the *branch* in question determines the return value of the value resolver. In the above example, the *input value* type is checked in two stages: - If the [Check type](/v1/docs/en/core-check-type-rule) for "String" is passed, a [Trim](/v1/docs/en/core-trim-string-resolver) value resolver removes marginal spaces from the *input value* (if any) to determine the return value. - If a [Check type](/v1/docs/en/core-check-type-rule) for "Long" OR "Number" is successful, the [Format number](/v1/docs/en/core-number-format-resolver) value resolver creates a "String" for the return value from the numeric value in the *input value*. - If none of the checked types matches, the static text `VOID` is set as the return value. ## Configuration | Immediately after adding the value resolver, it appears "without branches" as shown at the beginning. Clicking on the ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/add(45).svg) icon then adds the first *branch* (see image on the right): - Clicking the ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/add(45).svg) icon inside the dashed diamond (above) opens the context menu for optional *rule configuration* for the *branch*. The [Rule editor](/v1/docs/en/orchestration-rule-editor) allows you to define an arbitrarily complex aggregate of rules to define a condition for "entering" the *branch*. - Below, a value resolver or a concatenation of value resolvers can optionally be configured to define the return value if the *branch* is "entered" at runtime. The *input value* (symbolized by the arrow from above) is available for both *rule configuration* and *value configuration*. **NOTE:** If no *value configuration* is used at all, a *branch* may return "No value" (`$null`) instead of the input value. The *input value* must be actively "passed through" if required, for example by an [Object property](/v1/docs/en/core-property-resolver) value resolver without selecting a field or an [Input object (type safe)](/v1/docs/en/core-root-entity-resolver) value resolver with a suitable type. | ![images/download/attachments/106962967/image2022-11-23_10-52-4-version-1-modificationdate-1669197124809-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-11-23_10-52-4-version-1-modificationdate-1669197124809-api-v2.png) | | --- | --- | | In the top left corner of a *branch*, the context menu icon provides access to useful operations for editing the configuration: - **Cut →** Removes the *branch* at the current position and saves it to the *clipboard* to be pasted later**.** - **Copy →** Saves the *branch* to the *clipboard* to be pasted later. - **Paste** (only visible if the *clipboard* is filled) → pastes the clipboard contents at the current position and moves the current *branch* and all subsequent ones to the right. - **Remove →** Removes the *branch* at the current position (without changing the *clipboard*). **NOTE:** The sequence of already created *branches* can be changed e.g. by a combination of **Cut** and **Paste** operations. However, it may be more efficient to resort to the surrounding configuration's tree view, where the order *branches* can be adjusted via *drag & drop*. | ![images/download/attachments/106962967/image2022-11-23_11-9-53-version-1-modificationdate-1669198193748-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-11-23_11-9-53-version-1-modificationdate-1669198193748-api-v2.png) | ## Example ### Simple use case: Conditional field selection for a comparison An association criteria (see [Association criteria](/v1/docs/en/core-association-criteria)) should always be considered "passed" if a user (see [Users](/v1/docs/en/base-user)) or guest user (see [Guest users](/v1/docs/en/base-guest-user)) is logged in whose logon basis is "threatened": - As a potential threat to the user, the "password expiry date" should be monitored. - For the guest user, the limited validity of the account ("Valid until" field) should be monitored as a "threat". The association criteria should be effective in both cases if the corresponding *cut-off* date is before the end of the current month. Configuration: ![images/download/attachments/106962967/image2022-11-23_14-6-25-version-1-modificationdate-1669208785846-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-11-23_14-6-25-version-1-modificationdate-1669208785846-api-v2.png) The mapped association criteria within a [With rule](/v1/docs/en/core-with-rule) refers to the [User of session](/v1/docs/en/base-session-user-value) as the *reference object* for an [Entity property rule](/v1/docs/en/core-entity-property-rule). Within the [Entity property rule](/v1/docs/en/core-entity-property-rule), the relevant date field for the respective account type is per [Compare with (Form designer)](/v1/docs/en/frebehav-compare-with) the end of the current month, which is determined using a [Relative date with time](/v1/docs/en/core-date-time-value) value resolver. The date field that is decisive for the logged-in account type is assigned here via the [Conditional value](/v1/docs/en/core-conditional-value-resolver) value resolver: - The first *branch* determines whether a user is logged in by [Check type](/v1/docs/en/core-check-type-rule). If this is the case, the "Password expiry date" `passwordExpiryDate` field should be checked by comparison. - The second branch uses a [Check type](/v1/docs/en/core-check-type-rule) to determine whether a guest user is logged in. If this is the case, the "Valid until" (`validTo`) field is checked by comparison. **NOTE:** Since in the specific case neither the user account has a `validTo` field nor the guest user account has a `passwordExpiryDate`, one could also "determine" the relevant field in each case with the default value value resolver. However, the [Conditional value](/v1/docs/en/core-conditional-value-resolver) covers the general case of an optional access much more flexibly and transparently than the [Default value](/v1/docs/en/core-default-value-resolver), which can assign an alternative value only as a *fallback*.