--- title: "Rule value" slug: "core-rule-value" updated: 2026-04-23T13:51:13Z published: 2026-04-23T13:51:13Z canonical: "docs.lobstersoftware.com/core-rule-value" --- > ## 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. # Rule value > [!NOTE] > **Value resolver – Abstract** > > **Purpose:** Evaluates the configured *rule* and returns the *check result* as a Boolean value (`true/false`). > > > [!TIP] > > Tooltip > > > > - **Usage**: The *rule* defined in the configuration is evaluated – taking the *input value* into account if necessary – to determine the Boolean return value (`true/false`). The *check result* of a *rule* is therefore available as a compare value or for a value assignment. > > - **Parameter**: The only optional parameter is a configuration option for a *rule* that determines the return value (`Boolean`). Without configuring a *rule*, `true` is returned as the default value. > > - **NOTE:** The [Sub criterion rule](/v1/docs/en/core-association-sub-criteria-rule) in conjunction with the [Rule value](/v1/docs/en/core-rule-value) resolver allows logics from association criteria in [Event handling](/v1/docs/en/administration-designer-workflow-action-event-handler-configuration) or "searches" (see examples in the manual) to be included. ![images/download/attachments/78256085/image2022-9-2_13-14-38-version-1-modificationdate-1662117279178-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-2_13-14-38-version-1-modificationdate-1662117279178-api-v2.png) The [Rule value](/v1/docs/en/core-rule-value) resolver evaluates the configured *rule* and returns the *check result* as a Boolean value (`true/false`). In this way, a test result can be used in a value assignment or as a compare value in a rule. ## Configuration | Clicking the ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/add(59).svg) icon opens the context menu for adding a rule type to the *rule*. The offer of rule types and rule type categories in the context menu may differ depending on the installed/licensed modules and the *input value* type defined by the context. Starting from the initially created *rule*, further rule types can be added AND or OR linked to represent arbitrarily complex logics (for details see [Rule editor](/v1/docs/en/orchestration-rule-editor)). **NOTE:** If no *rule* is configured, then the return value is by definition `true`. | ![images/download/attachments/78256085/image2022-9-2_13-37-38-version-1-modificationdate-1662118658356-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-2_13-37-38-version-1-modificationdate-1662118658356-api-v2.png) | | --- | --- | ## Examples ### Simple use case: Check result as a value assignment for a field Each time a user account (see [Users](/v1/docs/en/base-user)) is saved (Create/Update), it is checked whether the "Account number" (`accountNumber`) field is filled in the user's address. The result of this check determines the status for the "Active" (`active`) `Boolean` field, so that an account with "Account number" is automatically "Active" and one without "Account number" is or becomes automatically "Inactive". Configuration: | A specially set up event handler that reacts to the **Triggering events** "Update" and "Create" (see [Common](/v1/docs/en/orchestration-common)) is configured as shown on the right: --- The **Validating rule** uses [Check type](/v1/docs/en/core-check-type-rule) to ensure that the *input value* is a user account (see [Users](/v1/docs/en/base-user)) that should be created or updated. --- A [Set value](/v1/docs/en/core-set-value-actor) event action is used here as the **Action on passed rule** for automatic value assignment: - As a target for the assignment the "Active" (`active`) field in the user account given as a r*eference object* is defined on the left by the [Object property](/v1/docs/en/core-property-resolver) value resolver. - On the right side, the value for the assignment is determined by the [Rule value](/v1/docs/en/core-rule-value) resolver: - An [Entity property rule](/v1/docs/en/core-entity-property-rule) checks whether the "Account number" (`address.accountNumber`) address field contains a value or not. For the desired logical dependency the [Is empty](/v1/docs/en/core-is-empty-matcher) matcher used must be negated here (see [not (Matcher)](/v1/docs/en/core-not-matcher)). **NOTE:** Alternatively, it is possible to negate the [Entity property rule](/v1/docs/en/core-entity-property-rule) altogether (see [Not rule](/v1/docs/en/core-not-rule). | ![images/download/attachments/78256085/image2022-9-2_13-39-39-version-1-modificationdate-1662118779409-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-2_13-39-39-version-1-modificationdate-1662118779409-api-v2.png) | | --- | --- | **NOTE:** The value assignment of the return value from the [Rule value](/v1/docs/en/core-rule-value) resolver solves the given task much more efficiently than an [If then else](/v1/docs/en/core-if-then-else-actor) event action with two alternative instances of the [Set value](/v1/docs/en/core-set-value-actor) event action in the IF and THEN branches could. ### More complex use case: Store test results in variables An association criterion, which is used as a "logic module", checks an address (see [Addresses](/v1/docs/en/base-address)) at each step and stores the result of each step (as far as this step was executed) in a variable. These variables with the check results can then be evaluated by subsequent association criteria or or in an event handling that refers to the association criteria as a [Sub criterion rule](/v1/docs/en/core-association-sub-criteria-rule) in the "Validating rule" without having to repeat the actual check. For a clear use case, the "logic module" should only contain two AND linked checks: 1. The first check determines whether the "Account number" (`accNumber`) field in the address to be checked is populated. 2. The second check looks up – whether an "Account number" is specified – and whether an address book entry exists that refers to this "Account number". Configuration: An association criteria `XF_ACCOUNT_EXISTS` is configured as described below. > [!WARNING] > **IMPORTANT:** > > This association criteria uses the [Check existence](/v1/docs/en/core-exists-rule) value resolver, which implies access to the **Lobster Data Platform/Orchestration** database. Such database accesses should be triggered as seldom as possible and only in a targeted manner in consideration of performance. For our association criteria, this can be achieved by selecting the **Logical** **component** option (see [Association criteria of type 'Logical component'](/v1/docs/en/core-association-criteria-logical-components)). This causes the association criteria to be evaluated only if it is addressed directly and not automatically each time the context is updated. | The association criteria for the two-step check of the address is configured as shown on the right: - First a [Check type](/v1/docs/en/core-check-type-rule) ensures that an address is present as *input value*. If this is not the case, the rule is considered failed without further testing. - The following [Entity property rule](/v1/docs/en/core-entity-property-rule) within the AND operation checks if the "Account number" (`accountNumber`) field of the address is filled in. As usual, this check is done using an [Entity property rule](/v1/docs/en/core-entity-property-rule) with the [Is empty](/v1/docs/en/core-is-empty-matcher) matcher negated, since the result should be `true` if an account number is present. - Exceptionally, this check is handled as a *rule* in a [Rule value](/v1/docs/en/core-rule-value) value resolver, which in turn is in the context of an (outer) [Entity property rule](/v1/docs/en/core-entity-property-rule) that compares the return value from the rule value (left) with the static value `true` (right). - The [Rule value](/v1/docs/en/core-rule-value) resolver allows the test result to be stored in a variable via the concatenated [Store value as variable](/v1/docs/en/core-store-value-resolver) value resolver. - The second step of the test is performed according to the same scheme. However, a [Check existence](/v1/docs/en/core-exists-rule) rule is used here in the [Rule value](/v1/docs/en/core-rule-value) resolver, which uses database access to determine whether an address book entry exists whose "Account number" matches the "Account number" of the address to be checked. - The result of this check is stored in the `foundInAddressBook` variable. | ![images/download/attachments/78256085/image2022-9-2_13-42-47-version-1-modificationdate-1662118967728-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-2_13-42-47-version-1-modificationdate-1662118967728-api-v2.png)![images/download/attachments/78256085/image2022-9-2_13-43-26-version-1-modificationdate-1662119007132-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-2_13-43-26-version-1-modificationdate-1662119007132-api-v2.png) | | --- | --- | The following combinatorics results for the course of the tests by this association criteria: | Input value: Type | Input value: Account number | Check result`accountSpecified` | Check result`foundInAddressBook` | Association criteria | | --- | --- | --- | --- | --- | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(32).svg) No address | n/a | `$null` | `$null` | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(32).svg) Not passed | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(38).svg) Address | | `(Fehler) false` | `$null` | | | `(Haken) true` | `(Fehler) false` | | | `(Haken) true` | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(38).svg) Passed | If this association criteria is included as a [Sub criterion rule](/v1/docs/en/core-association-sub-criteria-rule), e.g. in an [If then else](/v1/docs/en/core-if-then-else-actor) event action, the following four different scenarios can be distinguished on the basis of the two variables, if required. Based on this, a check of the addresses for a list of user accounts is executed and the check result per entry is output. Runtime example: | User | Address | Account number | Address book entry | Check condition | Output | | --- | --- | --- | --- | --- | --- | | Ima | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(38).svg) | 17252 | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(38).svg) Found | Association criteria `XF_ACCOUNT_EXISTS` → Rule passed! | ![images/download/attachments/78256085/image2022-9-2_13-47-29-version-1-modificationdate-1662119249647-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-2_13-47-29-version-1-modificationdate-1662119249647-api-v2.png) | | Karola | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(38).svg) | 17253 | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(32).svg) Not available | └ELSE: Variable `foundInAddressBook` = `false` | | Maik-Viktor | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(38).svg) | | n/a | └ELSE: Variable `accountSpecified` = `false` | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(32).svg) n/a (Guest user) | | | n/a | └ELSE(without any condition) | Configuration: ![images/download/attachments/78256085/image2022-9-2_13-52-8-version-1-modificationdate-1662119529095-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-2_13-52-8-version-1-modificationdate-1662119529095-api-v2.png) - In the **Resolver for entities** of the loop (see [For each loop](/v1/docs/en/core-for-each-entity-actor)), a [Collect values](/v1/docs/en/core-collect-resolver) resolver determines the addresses of the associated user accounts starting from a given list of `Long` values ("User IDs"). The following concatenation of value resolvers is processed for each entry: - [Input object (type safe)](/v1/docs/en/core-root-entity-resolver): To convert the `Long` values into [Users](/v1/docs/en/base-user). - [Object property](/v1/docs/en/core-property-resolver): Value resolver for accessing the `address` field in the user account. - [Default value](/v1/docs/en/core-default-value-resolver): Value resolver that enters the `false` static `Boolean` value into the list if no address is found. **NOTE:** A `$null` value would otherwise simply be omitted by the [Collect values](/v1/docs/en/core-collect-resolver) resolver. - The two [Set value](/v1/docs/en/core-set-value-actor) event actions are used to ensure that in each iteration of the loop, the `accountSpecified` and `foundInAddressBook` variables are reset to "no value" before the `XF_ACCOUNT_EXISTS` association criteria is evaluated. - The [If then else](/v1/docs/en/core-if-then-else-actor) event action checks through the fourfold case distinction "from left to right" until one of the rules applies. Then the actions are executed below. In the example, a [Show alert (Popup)](/v1/docs/en/core-popup-actor) event action with a specific message is executed in each case. - The first condition checks the association criteria `XF_ACCOUNT_EXISTS` as a [Sub criterion rule](/v1/docs/en/core-association-sub-criteria-rule). The `accountSpecified` and `foundInAddressBook` variables are assigned via the [Rule value](/v1/docs/en/core-rule-value) value resolver depending on the history. - The [Sub criterion rule](/v1/docs/en/core-association-sub-criteria-rule) applies exactly when both variables contain the value `$true`. This case can therefore be identified without direct checks for variables. - The second condition checks if the `foundInAddressBook` variable has the value `false`. This value is assigned exactly when there is an "Account number" to look up that is not yet in any address book. - The third condition checks if the `accountSpecified` variable has the value `false` . This value is assigned exactly when an address is present and it does not specify an "Account number". - The fourth branch of case differentiation does not use any condition. It is only entered if none of the conditions for other branches apply. This is only the case if the [Check type](/v1/docs/en/core-check-type-rule) for the "address" type in the [Sub criterion rule](/v1/docs/en/core-association-sub-criteria-rule) fails because there is no address to check but the `Boolean` value `false` from the [Default value](/v1/docs/en/core-default-value-resolver) resolver in the **Resolver for entities** (see above). ### Special use case: Evaluate a rule in the context of a search The [Rule value](/v1/docs/en/core-rule-value) resolver can also be useful if the condition of a search (see [Search API](/v1/docs/en/common-search-api)) should include the check result of a *rule* or an association criteria (as a [Sub criterion rule](/v1/docs/en/core-association-sub-criteria-rule)). The following example demonstrates this using a configuration for a row formatting **Condition** in a data grid (see [Row formatting in datagrids](/v1/docs/en/datagrid-row-formatter), [Datagrid preferences overview](/v1/docs/en/core-client-preferences-datagrid-list-details-window)). | The **Row formatter** "HIGHLIGHT" should emphasize all users in the data grid of an overview for [Users](/v1/docs/en/base-user) for which the [Company of session](/v1/docs/en/base-session-company-account-value) is the "Owner" (`ownerId`). However, this format should only take effect if the Is [Is mobile](/v1/docs/en/core-is-mobile-rule) concludes that **Lobster Data Platform/Orchestration** is running on a mobile device. Within the condition, first the conventional check per [Field restriction](/v1/docs/en/core-property-search) is executed for the "Owner" (`ownerId`) field, which should match the ID (`id`) of the [Company of session](/v1/docs/en/base-session-company-account-value). The AND conjunction is then followed by another [Field restriction](/v1/docs/en/core-property-search) that evaluates the [Is mobile](/v1/docs/en/core-is-mobile-rule) rule. Only on the right side of a [Field restriction](/v1/docs/en/core-property-search) can value resolvers be accessed whose return value is considered static (i.e. "the same for all rows") in the context of the search. Using the [Rule value](/v1/docs/en/core-rule-value) resolver, a `Boolean value` can be generated depending on the result of the [Is mobile](/v1/docs/en/core-is-mobile-rule) rule for the current session, which can be compared with a static Boolean value (as [Literal projection](/v1/docs/en/core-literal-projection)), for example, as shown in the image. | ![images/download/attachments/78256085/image2022-9-2_13-54-40-version-1-modificationdate-1662119681109-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-9-2_13-54-40-version-1-modificationdate-1662119681109-api-v2.png) | | --- | --- | **NOTE:** It is not possible to pass the data of the "*row* to be evaluated" to which the condition refers as *input value* to the [Rule value](/v1/docs/en/core-rule-value) resolver. If the right side does not define a projection, a value is resolved only once, namely before the search starts.