--- title: "Modify list/Add" slug: "core-modify-collection-actor-add" updated: 2026-03-31T12:17:57Z published: 2026-03-31T12:17:57Z canonical: "docs.lobstersoftware.com/core-modify-collection-actor-add" --- > ## 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. # Modify list/Add The 'Add' operation can be used to add a single entry to a given list, which generally appears at the end of the list. ## Configuration The 'Add' operation is already selected after adding a [Modify list](/v1/docs/en/core-modify-collection-actor) event action to a workflow. The *value configuration* for the modified list (left) must provide an updatable list at runtime. - If a *value configuration* for the modified list (left) is omitted, the *reference object* is automatically used in the context of the [Modify list](/v1/docs/en/core-modify-collection-actor) event action. The *value configuration* (right) defines the added entry. - If a *value configuration* for the added entry (right) is omitted, the default value is 'No value' (`$null`). - However, an explicit *value configuration* for the added entry (right) can still access the *reference object* in the context of the [Modify list](/v1/docs/en/core-modify-collection-actor) event action. ## Examples ### Simple use cases: List with simple values The following series of examples demonstrates different *simple* use cases for adding entries to a list of simple values (of the `String` type) with the [Modify list](/v1/docs/en/core-modify-collection-actor) event action. The 'Result' column shows the JSON image of the resulting value for the list stored in the `list` variable after the sequential execution of all configurations up to the respective table row. | Configuration | Description | Result | | --- | --- | --- | | ![images/download/attachments/189462039/image-2025-1-29_8-23-7-version-1-modificationdate-1738135387537-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-1-29_8-23-7-version-1-modificationdate-1738135387537-api-v2.png) | The *value configuration* for the modified list (left) creates an empty list via the [Create instance](/v1/docs/en/core-create-instance-resolver) value resolver and assigns this data object to the `list` variable via the concatenated [Store value as variable](/v1/docs/en/core-store-value-resolver) resolver. --- **IMPORTANT:** The initialization of the list is absolutely necessary here. A [Variable](/v1/docs/en/core-storage-value) value resolver with the 'List' type cannot replace the value resolver chain as it does not automatically generate a `List` object. --- A value resolver for the [Text](/v1/docs/en/core-text-value-editor) with the text value `A` is used as the *value configuration* for the added entry (right). | `["A"]` | | ![images/download/attachments/189462039/image-2025-1-29_8-23-40-version-1-modificationdate-1738135420413-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-1-29_8-23-40-version-1-modificationdate-1738135420413-api-v2.png) | The next step is to first use an [Execute with](/v1/docs/en/core-with-actor) event action to define the list created in the previous step as a *temporary reference object* for the action block. This is done by the [Variable](/v1/docs/en/core-storage-value) value resolver in the **Object resolver** parameter by addressing the `list` variable name. --- **NOTE:** The settings for the **Type** and the **Is collection of** option were made manually here to reflect the arbitrary convention that 'our' list should only contain text values. Therefore, the `String[]` data type – i.e. '`String` list' – is notified for the action block below. Within the [Modify list](/v1/docs/en/core-modify-collection-actor) event action, this type note also appears for the left-hand *value configuration*. We can therefore dispense with an explicit *value configuration* for the modified list, as this is available as a *reference object* at runtime. --- A value resolver for static [Text](/v1/docs/en/core-text-value-editor) with the text value `B` is used as the *value configuration* for the entry to be added (right), as in the previous example. **NOTE:** The [Modify list](/v1/docs/en/core-modify-collection-actor) event action always adds new entries to the end of a list. | `["A","B"]` | | ![images/download/attachments/189462039/image-2025-1-29_8-24-19-version-1-modificationdate-1738135459389-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-1-29_8-24-19-version-1-modificationdate-1738135459389-api-v2.png) | The next step demonstrates that a list available as a *reference object* can be used as an *input value* for the *value configurations* on both sides of the [Modify list](/v1/docs/en/core-modify-collection-actor) event action. Similar to the previous step, an [Execute with](/v1/docs/en/core-with-actor) event action refers to the `list` variable as a *temporary reference object*. Of course, alternatively, the action block from the previous step could have been extended. As in the previous step, there is no explicit *value configuration* for the list to be modified (left) within the [Modify list](/v1/docs/en/core-modify-collection-actor) event action, as this is available as a *temporary reference object*. The *value configuration* for the added entry (right) uses a [List item](/v1/docs/en/core-list-item-resolver) value resolver that returns the first entry from the list available as an *input value* or *reference object* with default settings ('Value (from start)' mode and offset `0`). Therefore, in the given scenario, the [List item](/v1/docs/en/core-list-item-resolver) returns the text value `A` that was added to the `list` list in the first step. This value is now added again at the end of the list. | `["A","B","A"]` | | ![images/download/attachments/189462039/image-2025-1-29_8-24-49-version-1-modificationdate-1738135489310-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-1-29_8-24-49-version-1-modificationdate-1738135489310-api-v2.png) | The final step demonstrates the special interpretation if a *value configuration* is omitted for the entry to be added (right): As in the previous step, the existing list (via [Variable](/v1/docs/en/core-storage-value) `list`) is available as a *temporary reference* *object* in the action block of an [Execute with](/v1/docs/en/core-with-actor) event action. As above, a *value configuration* for the list to be modified (left) has been omitted, so this list is modified. In contrast to the previous step, the *value configuration* for the added entry (right) has now also been omitted. In contrast to the *value configuration* on the left, 'No value' (`$null`) is the entry added on the right and not the string image of the list built up to that point. | `["A","B","A",null]` | ### Special use case: Unique list In general, 'lists' in **Lobster Data Platform/Orchestration** are data objects of the 'list' (`List`) type, in which entries of any type can be 'strung together'. The same entry can also occur multiple times. However, a 'unique list' (`Set`) is used in special cases. A 'unique list' generally also allows entries of different types, but cannot contain the same entry more than once. The data structure for [Users](/v1/docs/en/base-user), for example, provides the 'Companies' (`companies`) field for a 'Unique list' of `Long` values that are references to the 'ID' (`id`) of [Companies/Clients](/v1/docs/en/base-company-account), which the user can use as the [Company of session](/v1/docs/en/base-session-company-account-value) when logging in. In the following example, the [Modify list](/v1/docs/en/core-modify-collection-actor) event action is used to ensure that the list of 'companies' (`companies`) for a given user account contains references to the [Company of session](/v1/docs/en/base-session-company-account-value) and any other company with the [Company type](/v1/docs/en/base-company-type) 'Bill-to party' from its parent hierarchy. Configuration: | Within an action block that provides the relevant user account as a *reference object* (e.g. an [Execute with](/v1/docs/en/core-with-actor) or [For each loop](/v1/docs/en/core-for-each-entity-actor) event action), two instances of the [Modify list](/v1/docs/en/core-modify-collection-actor) event action are configured as shown on the right: - In both cases, the *value configuration* for the modified list (left) is an [Object property](/v1/docs/en/core-property-resolver) resolver that defines the list in the 'Companies' (`companies`) field as the list to be modified. **NOTE:** Unfortunately, the `Long[]` type hint displayed in the configuration does not indicate whether the `companies` field contains a `List` or a `Set` object. The server XML of the user account also provides no direct indication of the list type. - The *value configuration* for the added entry (right) uses a [Company of session](/v1/docs/en/base-session-company-account-value) resolver in both cases. **NOTE:** No explicit read access to the 'ID' (`id`) field via an [Object property](/v1/docs/en/core-property-resolver) value resolver was used here, as an automatic type conversion (entity → `Long`) takes effect in the given scenario. - In the first case, the [Company of session](/v1/docs/en/base-session-company-account-value) is accessed directly – without a default for the [Company type](/v1/docs/en/base-company-type) (in the **Of type** parameter). - In the second case, a company with the [Company type](/v1/docs/en/base-company-type) 'Bill-to party' (`INV`) is to be determined. Starting from the [Company of session](/v1/docs/en/base-session-company-account-value), the company hierarchy is searched upwards until a company is found that contains this [Company type](/v1/docs/en/base-company-type) in the 'Company types' (`types`) field. Furthermore, the 'Company types' (`types`) field is another example of a 'Unique list'. | ![images/download/attachments/189462039/image-2025-1-29_8-26-30-version-1-modificationdate-1738135589763-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-1-29_8-26-30-version-1-modificationdate-1738135589763-api-v2.png) | | --- | --- | The following scenarios are possible for the runtime behavior of this configuration: - If the user account has not been saved yet, so there is no `companies` list at the beginning, the field is automatically initialised with an empty 'Unique list'. In contrast to the previous example, there is no need to use the [Create instance](/v1/docs/en/core-create-instance-resolver) value resolver. - If the 'ID' (`id`) of the [Company of session](/v1/docs/en/base-session-company-account-value) is not yet included in the list of `companies`, it will be added. - If the account of the [Company of session](/v1/docs/en/base-session-company-account-value) refers to the [Company type](/v1/docs/en/base-company-type) 'Bill-to party' via the 'Company types' (`types`) list field, the second instance of the [Modify list](/v1/docs/en/core-modify-collection-actor) event action has no effect, as the 'ID' (`id`) of the [Company of session](/v1/docs/en/base-session-company-account-value) may already have been added to the companies list. - Otherwise, the parent company hierarchy is searched for a company that qualifies as a 'Bill-to party'. - If a corresponding company is found and its 'ID' (`id`) is not yet included in the user's list of `companies`, it will be added. - In all other cases (no 'Bill-to party' can be found or the 'Bill-to party' determined is already contained in the `companies` list), the second instance of the [Modify list](/v1/docs/en/core-modify-collection-actor) event action has no effect, ### More complex use case: Adding a typed plural attribute When a new user account (see [Users](/v1/docs/en/base-user)) is created, the address of the [Company of session](/v1/docs/en/base-session-company-account-value) should be added to its address contacts with the [Contact type](/v1/docs/en/base-contact-type) 'Location' (`LOCATION`). Configuration: In an event handling that reacts to the 'Create' event (see [Common action event](/v1/docs/en/core-common-action-event) and uses [Check type](/v1/docs/en/core-check-type-rule) to ensure that an entity of the type 'User' (`User`) is to be created, a [Modify list](/v1/docs/en/core-modify-collection-actor) event action is configured as follows: ![images/download/attachments/189462039/image-2025-1-29_8-28-33-version-1-modificationdate-1738135712799-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-1-29_8-28-33-version-1-modificationdate-1738135712799-api-v2.png) - The *value configuration* for the list to be modified (left) uses a value resolver chain: - The [Object property](/v1/docs/en/core-property-resolver) value resolver first accesses the `address` field of the user account available as a *reference object*. - The concatenated [Plural typed attribute resolver](/v1/docs/en/core-typed-attributes-resolver) refers by selection for **Typed attribute** to the type 'Address contact' and its **Subtype '**Location’ (`LOCATION`), which was previously created as a custom value in the dynamic enumeration [Contact type](/v1/docs/en/base-contact-type). - The *value configuration* for the added entry (right) uses the [Create instance with values](/v1/docs/en/core-create-instance-with-values-resolver) resolver to create an attribute value for the **Type** ‘AddressContact' (`AddressContact`). - The only **Property** that needs to be set explicitly for this new attribute value is the `contactAddress` field, which is assigned the address of the [Company of session](/v1/docs/en/base-session-company-account-value) as the value. - As the modified list (left) uniquely qualifies the **Subtype '**Location' (`LOCATION`) via the configuration for the [Plural typed attribute resolver](/v1/docs/en/core-typed-attributes-resolver), this does not need to be explicitly assigned in the address contact value on the right. **NOTE:** If several address contacts with different [Contact type](/v1/docs/en/base-contact-type) are assigned when the user account is created, the [All attributes of one type](/v1/docs/en/core-attributes-resolver) resolver with the type 'Address contact' could be used to initially define the modified list without reference to a **Subtype**. This list can then be modified by a series of different [Modify list](/v1/docs/en/core-modify-collection-actor) instances, which must, however, contain an explicit assignment for the 'Contact type' (`contactType`) field for each entry added. **NOTE:** In this example, the address data of the [Company of session](/v1/docs/en/base-session-company-account-value) is transferred to the new address contact of the created user. As addresses are [Referenced objects](/v1/docs/en/orchestration-referenced-objects), the `address` field of the company and the `contactAddress` field of the address contact currently refer to the same 'address' entity. However, the address data in both contexts can be changed at any time, which would result in the reference to a different 'address' entity being changed in each case. There is no permanent link between the company address and the address contact.