--- title: "Set values" slug: "core-set-values-actor" updated: 2026-04-02T06:54:47Z published: 2026-04-02T06:54:47Z canonical: "docs.lobstersoftware.com/core-set-values-actor" --- > ## 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. # Set values *See also:* [Set value](/v1/docs/en/core-set-value-actor), [Create instance with values](/v1/docs/en/core-create-instance-with-values-resolver) > [!NOTE] > Event action – Abstract > > **Purpose**: The [Set values](/v1/docs/en/core-set-values-actor) event action combines a flexible number of *assignments* in a single event action, for the configuration of which one source host and one target host can be defined as *input values*. > > > [!TIP] > > Tooltip > > > > - **Usage**: > > - **Parameter**: All event action parameters are *value configurations*: > > - **Source host**: Optional *value configuration* for a uniform *input value* for **Source values** that differs from the *reference object.* > > - **Target host**: Optional *value configuration* for a uniform *input value* for **Target values** that differs from the *reference object.* > > - *Assignments*: Undefined number of source value-target value pairs with one *value* *configuration* each: > > - **Source values**: *Value configurations* for assigned values (possibly based on the **Source object** as *input value*). > > - **Target values**: *Value configurations* for assignment targets (possibly based on the **Target host** as *input value*) > > - **NOTE:** > > - The order of *assignments* that have already been created can be adjusted as required via the tree view using *drag & drop*. > > - The *reference object* in the execution context can be addressed in *assignments* as required via the `entity` variable. ![images/download/attachments/189441276/image-2024-12-9_9-21-30-version-1-modificationdate-1733732489624-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-12-9_9-21-30-version-1-modificationdate-1733732489624-api-v2.png) The [Set values](/v1/docs/en/core-set-values-actor) event action combines a flexible number of *assignments* (**Source values → Target values**) in a single event action. For the context of these *assignments*, a **Source host** and a **Target host** can optionally be defined via a *value* *configuration*. - If there is a *value configuration* for the **Source host**, its return value is used as the *input value* for all *value* *configurations* for **Source values** in *assignments*. - If there is a *value configuration* for the **Target host**, its return value is used as the *input value* for all *value* *configurations* for **Target values** in *assignments*. - Without a *value configuration* for the **Source host** or the **Target host**, the *reference object* in the execution context (if available) represents the *input value* for *value configurations* on the relevant page in all *assignments*. The individual *value configurations* in the *assignments* are not necessarily bound to the **Source host** or **Target host**. Any other data objects or static values of any kind can be addressed via value resolvers. --- **IMPORTANT:** The `entity` and `entityClass` variables do not refer to the **Source host** or the **Target host** in the context of the assignments, but to the *reference object* unchanged on both sides of the *assignment*. Value resolvers that ignore the *input value* and can only process the *reference object* (e.g. [Template](/v1/docs/en/core-template-content-builder) or [XML export](/v1/docs/en/core-xml-export-content-builder)) do not access the **Source host** or the **Target host**, even within an *assignment*. --- ## Configuration | Parameter | Description | Example | | --- | --- | --- | | **Target host** *Value configuration* | The *value configuration* for the **Target host** is optional. The *default value* is the *reference object* in the execution context. --- In the example (right), an [Object property](/v1/docs/en/core-property-resolver) resolver defines an `address` field with the 'Address' (`Address`) entity type in the data model of the *reference object* in the execution context as a **Target host**, so that its fields can be used as ***Target*** ***values*** in assignments. | ![images/download/attachments/189441276/image-2024-12-9_9-25-13-version-1-modificationdate-1733732712739-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-12-9_9-25-13-version-1-modificationdate-1733732712739-api-v2.png) | | **Source host** *Value configuration* | The *value configuration* for the **Source host** is optional*.* The *default value* is the *reference object* in the execution context. --- In the example (right), the company account that is considered the 'owner' (`ownerId`) of the *reference object* in the execution context is used as the **Source** **host**. Its fields can then be used as **Source values** in assignments. | ![images/download/attachments/189441276/image-2024-12-9_9-25-48-version-1-modificationdate-1733732747880-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-12-9_9-25-48-version-1-modificationdate-1733732747880-api-v2.png) | | ***Assignments*** | Any number of *assignments* can be added to the configuration using the ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/add(27).svg) icon. The first instance is initially displayed in the user interface so that *value configurations* can be set up directly without having to click the ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/add(27).svg) icon first. The *first assignment* cannot be removed. However, the ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/forbidden.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/forbidden(18).svg) symbol for the instance deletes all *value configurations*. All additional *assignments* are completely removed by clicking on the ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/forbidden.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/forbidden(18).svg) icon without further queries. **NOTE:** - The order of the *assignments* can be adjusted using *drag & drop* in the tree view (on the left in the editor), where each *assignment* is represented as an account with the label 'Set values > entry'. - It is not possible to make a complete *assignment*. **IMPORTANT:** The *assignments* are processed at runtime from top to bottom, so it cannot be ruled out that changing the order of the *assignments* will produce different results with identical input data. | | ![images/download/attachments/189441276/image-2024-12-9_9-27-15-version-1-modificationdate-1733732835255-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-12-9_9-27-15-version-1-modificationdate-1733732835255-api-v2.png) - In the example, two *assignments* are used to transfer the values of two fields (`city` and `countryCode`) from the address in the account of the 'owner' company (see configuration for the **Source host** above) of an entity to the corresponding detail fields of the address of this entity (see configuration for the **Target host** above). **NOTE:** The company account was specifically selected as the **Target host** here and not just its `address` field, although this would have simplified access to the **Source** **values**. The complete company account as a **Source host** makes it possible to also evaluate characteristics from the company account in *value configurations* for **Source values** in further *assignments* that are not contained within the address (`address`) or are included as an attribute (such as the 'Company type' and 'Parent companies' enumerations or the 'Meta company type' field). | ## Examples ### Typical use case: Mapping of selected property values Whenever a new user (see [Users](/v1/docs/en/base-user)) is created, selected address characteristics from the address of the [Company of session](/v1/docs/en/base-session-company-account-value) are transferred to their address: - 'Country' (`countryCode`) - 'ZIP code' (`zipcode`) - 'City' (`city`) Configuration: | The screenshot on the right illustrates the configuration for event handling that reacts to the **Triggering event** 'New' (`NEW`) for all entities (see [Common](/v1/docs/en/orchestration-common)). --- As a **Validating rule**, a [Check type](/v1/docs/en/core-check-type-rule) therefore ensures that event handling only takes place when a new 'User' (`User`) is created. --- If the 'New' ribbon button is pressed in the context of a data input form for [Users](/v1/docs/en/base-user), a [Set values](/v1/docs/en/core-set-values-actor) event action with the following configuration should be executed as the only **Action on passed rule**: - *Value configuration* for a **Target host**: An [Object property](/v1/docs/en/core-property-resolver) value resolver that defines the 'address' (`address`) of the new user as the *input value* for the *value configurations* of the **Target values**. - *Value configuration* for the **Source host**: A value resolver chain (see [Chained resolver](/v1/docs/en/core-chained-resolver)) that uses the [Company of session](/v1/docs/en/base-session-company-account-value) to define its 'address' (`address`) as the *input value* for the *value configurations* of the **Source values** via [Object property](/v1/docs/en/core-property-resolver) resolvers. - Three *assignments* are created that transfer the property values from the **Source host** to the **Target object**. As both pages refer to the same entity type (`Address`), the field names (left and right for each *assignment*) match. Source and target values are each addressed using [Object property](/v1/docs/en/core-property-resolver) resolvers. - 'Country' (`countryCode`) - 'ZIP code' (`zipcode`) - 'City' (`city`) **NOTE:** After clicking on 'New', the transferred data appears immediately in the input form, where it can be displayed and edited if necessary. Whether the 'enhanced' user account is saved or not is up to the user of the form. | ![images/download/attachments/189441276/image-2024-12-9_9-28-57-version-1-modificationdate-1733732937458-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-12-9_9-28-57-version-1-modificationdate-1733732937458-api-v2.png) | | --- | --- | ### Special use case: Access to the source host, target host and another reference object Based on the previous example, a registered company should be given the option of creating several [Users](/v1/docs/en/base-user) from a list in csv format via [Batch import](/v1/docs/en/core-batch-import). When creating the new user account, the 'Country', 'ZIP code' and 'City' address fields should again be assigned the corresponding values from the address of the [Company of session](/v1/docs/en/base-session-company-account-value). Furthermore, a text value is assigned to the user account in the 'Match code' address field, in which the unique 'username' is linked to the value from the 'Match code' (`accMatchCode`) address field of the [Company of session](/v1/docs/en/base-session-company-account-value) according to the following structure: `<username>@<company_address_accMatchCode>` Configuration: The following screenshot shows how the *mapping* from the previous example can be extended to be reused in the context of an event handling that is triggered when a user account is 'created' (see [Common](/v1/docs/en/orchestration-common)) via [Batch import](/v1/docs/en/core-batch-import). **NOTE:** In contrast to the previous use case, where an empty user account should be enriched before displaying the unsaved data in a data entry mask, the [Batch import](/v1/docs/en/core-batch-import) provides some data (e.g. 'Username') for the user account to be created from the csv file. In the context of a `CREATE` action, the 'Create” event is automatically triggered during import. An event handling that reacts to this event can then 'revise' the data to be saved. The *Validating rule* of the event handling can use an AND junction with the absolutely necessary [Check type](/v1/docs/en/core-check-type-rule) (see above) to specify additional conditions that define when the synchronization of the address data takes effect at all. ![images/download/attachments/189441276/image-2024-12-9_9-31-16-version-1-modificationdate-1733733075750-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-12-9_9-31-16-version-1-modificationdate-1733733075750-api-v2.png) - The definitions for **Source host** and **Target host** as well as the first three *assignments* correspond exactly to the configuration from the previous example. - The fourth *assignment* is structured as follows: - As the **Target value** (left), in the same way as the other *assignments*, an [Object property](/v1/docs/en/core-property-resolver) resolver references the 'Match code' (`accMatchCode`) field in the address of the user account that is defined as the **Target host**. - The **Source value** (right) is defined by a [Concat strings](/v1/docs/en/core-concat-string-resolver) resolver with three *text components*: - The first *text component* defines a value resolver chain (see [Chained resolver](/v1/docs/en/core-chained-resolver)): - A [Variable](/v1/docs/en/core-storage-value) value resolver to the current *reference object* provided by the system via the `entity` variable. - The concatenated [Object property](/v1/docs/en/core-property-resolver) resolver can read the 'username' (`username`) field in this way, even though it is not contained in the company address provided as the **Source host**. - The second *text component i*s the '`@`' separator defined as static text. - The third *text component* accesses the 'Match code' (`accMatchCode`) field in the address of the [Company of session](/v1/docs/en/base-session-company-account-value), which is defined as the **Source host**. ### Special use case: Create list with values For automated tests of an interface, certain geopositions are to be generated repeatedly at random in the context of a [For each loop](/v1/docs/en/core-for-each-entity-actor) and assigned to a `randomPosition` variable. The individual geoposition should be defined as a list of exactly two decimal numbers with a maximum of three decimal places, the first of which specifies the latitude with a value range of ±90° and the second the longitude with a value range of ±180°. Configuration: | The screenshot on the right shows the configuration for a [Set values](/v1/docs/en/core-set-values-actor) event action that provides a random geoposition as a 'tuple' (list of two coordinates) in the `randomPosition` variable: - In the *value configuration* for the **Target host**, a [Create instance](/v1/docs/en/core-create-instance-resolver) resolver creates a new 'List' (`List`) instance, which is immediately assigned to the `randomPosition` variable as a value by the chained [Store value as variable](/v1/docs/en/core-store-value-resolver) resolver. - A *value configuration* for the **Source host** is not required for the following *assignments*, as the **Source values** are 'randomized' using the [Random long value](/v1/docs/en/core-random-long-resolver) resolver, which does not require an *input value*. - Exactly two list values are used as **Target values**, which are strung together in series using two instances of the [List item](/v1/docs/en/core-list-item-resolver) resolver with the **Mode** 'Add (at the end)'. **NOTE:** In principle, it would be advisable to create a client object structure with two named fields (e.g. `lat` and `lon`) instead of a list of anonymous coordinates, so that no unwritten convention (first value: latitude, second value: longitude) needs to be known in order to interpret the data correctly. However, the aim here is to demonstrate how flexibly and dynamically the [Set values](/v1/docs/en/core-set-values-actor) event action can be used to 'expand' a list available as a **Target host**. A [Create instance with values](/v1/docs/en/core-create-instance-with-values-resolver) resolver can also specifically address entries of a created list via discrete index values (`0`, `1`, ...) as **Target values**. However, a dynamic 'Add (at the end)' cannot be achieved in this way. | ![images/download/attachments/189441276/image-2024-12-9_9-33-22-version-1-modificationdate-1733733202341-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-12-9_9-33-22-version-1-modificationdate-1733733202341-api-v2.png) | | --- | --- |