--- title: "Create list" slug: "core-create-list-resolver" updated: 2026-04-23T08:56:37Z published: 2026-04-23T08:56:37Z canonical: "docs.lobstersoftware.com/core-create-list-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. # Create list > [!NOTE] > **Value resolver – Abstract** > > **Purpose:** Creates a data object of the "List" (`java.util.List`) type and returns it – optionally pre-populated with the entries defined via value resolvers. > > > [!TIP] > > Tooltip > > > > - **Usage**: The value resolver always returns a data object of the "List" (`java.util.List`) type, to which entries can optionally be assigned. If no entries are predefined, this list is empty (`[]`). > > - **Parameter**: > > - Optionally, any number of entries can be assigned to the generated list via a [Repeatable element](/v1/docs/en/fre-duplicate-element-container-vo). By default, "no value" (`$null`) is assigned as the list value. > > - Optionally, each list entry can be assigned a value, which is determined at runtime via value resolver. > > - **NOTE:** To create a `List` object without entries, the [Create instance](/v1/docs/en/core-create-instance-resolver) value resolver (with the class "List"/`java.util.List`) can be used alternatively. ![images/download/attachments/78256018/image2022-8-5_18-42-36-version-1-modificationdate-1659717756526-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-5_18-42-36-version-1-modificationdate-1659717756526-api-v2.png) The [Create list](/v1/docs/en/core-create-list-resolver) value resolver creates a data object of the "List" (`java.util.List`) type and returns it. The list can optionally be assigned values (`$null`, simple values or data objects) as entries. The *input value* is not processed immediately, but is passed on to the value resolvers for list entries as an *input value*. **NOTE:** To create a `List` object without entries, the [Create instance](/v1/docs/en/core-create-instance-resolver) value resolver (with the class "List"/`java.util.List`) can also be used. ## Configuration For optional assignment of entries for the generated list, instances can be added to the configuration by 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(55).svg) icon and [Resolvers](/v1/docs/en/core-i-value-resolver) can be defined in them. Existing entries can be 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(24).svg) icon. - Without entries (see screenshot above) the value resolver returns an "empty list" (similar to the [Create instance](/v1/docs/en/core-create-instance-resolver) value resolver with the class "List"/`java.util.List`). | ![images/download/attachments/78256018/image2022-8-5_18-43-3-version-1-modificationdate-1659717783538-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-5_18-43-3-version-1-modificationdate-1659717783538-api-v2.png) | Result (in JSON notation): ```plaintext { "class": "list", "data": [ ] } ``` | | --- | --- | By default, each entry is assigned "no value" (`$null`). However, this does create a list entry that contains the value `$null`: | ![images/download/attachments/78256018/image2022-8-8_9-49-56-version-1-modificationdate-1659944997227-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-8_9-49-56-version-1-modificationdate-1659944997227-api-v2.png) | Result (in JSON notation): ```plaintext { "class": "list", "data": [ null ] } ``` | | --- | --- | **NOTE:** When clicking the ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/add(55).svg) to add the first item, the read-only "template" for entries (with gray border) is replaced by an active entry (with blue border) in the configuration user interface. ## Examples ### Assignment to an object property that expects a list The "Companies" assigned to a certain user account (for the selection of the [Company of session](/v1/docs/en/base-session-company-account-value) at login) are assigned automatically via event handling. The list should refer to exactly two company accounts statically predefined in the configuration. Configuration: | The user account in question is defined as a *reference object* in the configuration on the right by an [Execute with](/v1/docs/en/core-with-actor) event action (not shown in the image). The assignment is done by a [Set value](/v1/docs/en/core-set-value-actor) event action: - The [Object property](/v1/docs/en/core-property-resolver) value resolver (left) defines the target property "Companies" (`companies)` for the assignment. **NOTE:** As the reference to the data type below the property selection in the value resolver suggests, the property expects a list of `Long` values, i.e. in our context the IDs (`id`) of the respective company accounts and not the complete company account as entity. - On the right, the [Create list](/v1/docs/en/core-create-list-resolver) value resolver creates one with the IDs of two company accounts, each defined by the [Company value](/v1/docs/en/base-company-account-value) value value resolver, from whose return value the "ID" (`id`) of the account is resolved via the concatenated [Object property](/v1/docs/en/core-property-resolver) value resolver in each case. **NOTE:** After predefining the ID values of the two companies, one could also achieve the same result by setting the IDs as static long values in the [Create list](/v1/docs/en/core-create-list-resolver) value resolver. However, this should be avoided with regard to the exchange of configurations via [Meta exchange](/v1/docs/en/administration-metaexchange) (e.g. between test/production system), since this automatically "recognizes" only company accounts identified via [Company value](/v1/docs/en/base-company-account-value) value resolver. | ![images/download/attachments/78256018/image2022-8-5_18-44-45-version-1-modificationdate-1659717885523-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-5_18-44-45-version-1-modificationdate-1659717885523-api-v2.png) | | --- | --- | ### Provide statically defined values for an In list comparison An association criterion is intended to assess whether the "Zip code" (`zipcode`) address property locates the [Company of session](/v1/docs/en/base-session-company-account-value) in one of several "hand-picked" regions in a given country. Configuration: | Within a [With rule](/v1/docs/en/core-with-rule) (not shown completely in the image), the *reference object* is the company address in the "address" (`address`) property of the company account returned by the [Company of session](/v1/docs/en/base-session-company-account-value) value resolver. In the context of this address, two AND-linked instances of the [Entity property rule](/v1/docs/en/core-entity-property-rule) are configured: - The first [Entity property rule](/v1/docs/en/core-entity-property-rule) ensures that the [Company of session](/v1/docs/en/base-session-company-account-value) is located in the searched country (*here*: Germany). - The second [Entity property rule](/v1/docs/en/core-entity-property-rule) checks whether the company is located in one of the searched postal code areas by means of the Zip code: - On the left, the [Object property](/v1/docs/en/core-property-resolver) value resolver reads the ZIP code from the "Zip code" (`zipcode`) property of the address. Using concatenation, the [Substring](/v1/docs/en/core-sub-string-resolver) value resolver extracts the first two digits from the postal code below, since only these digits are decisive for the check. - If the [In list](/v1/docs/en/core-in-matcher) type is selected as [Matchers](/v1/docs/en/core-i-value-matcher), the [Create list](/v1/docs/en/core-create-list-resolver) value resolver automatically appears on the right side as a suggestion. Here, the "positive list" with the two-digit number combinations for relevant regions can be entered directly. An entry must be created for each region by 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(55).svg) symbol. After that the leading digits of the Zip code can be configured as static text (see [Static values](/v1/docs/en/core-literal-value-resolver)) as value. **NOTE:** Instead of the [Create list](/v1/docs/en/core-create-list-resolver) value resolver (right), the list could also be defined quite conveniently as static text in JSON notation (see below) and passed to a [JSON to object](/v1/docs/en/core-json-decode-resolver) value resolver via concatenation: ["80","86","90"] | ![images/download/attachments/78256018/image2022-8-5_18-46-21-version-1-modificationdate-1659717981501-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-5_18-46-21-version-1-modificationdate-1659717981501-api-v2.png) | | --- | --- | ### Provide list values for one iteration per For each loop Using a [For each loop](/v1/docs/en/core-for-each-entity-actor), automatic information should be notified to *stakeholders* from the context of an entity as soon as it is deleted. Specifically, the following *stakeholders* should be informed about the deletion of the entity: - The creator of the entity, i.e. the user referenced in the "Creator" (`creatorId`) property. - *If different from the creator*: The user who last changed the entity according to the "Last modified by" (`lastModifierId`) property. - The owner of the entity, i.e. the company referenced in the "Owner" (`ownerId`) property. It is assumed that the address (`address`) of the relevant accounts ([Users](/v1/docs/en/base-user)/[Companies/Clients](/v1/docs/en/base-company-account)) contains an e-mail address for notification. Configuration: | Within an event handling that reacts to the event "Delete" (see [Common action event](/v1/docs/en/core-common-action-event)), the action part is configured as follows: - A [For each loop](/v1/docs/en/core-for-each-entity-actor) iterates over a list of addresses and triggers a [Custom action event](/v1/docs/en/core-custom-action-events) "Xf Mail Job" (`XF_MAIL_JOB`) for each address contained in the list (as *input value*). **NOTE:** Information about the deleted entity is provided to this event via the `deletedEntity` variable, which is filled in the loop header with the *input value* of the event handling shown here (i.e. the deleted entity). - In the **Resolver for entities**, the [Create list](/v1/docs/en/core-create-list-resolver) value resolver is used, which creates a list with exactly three entities: - For the first entry, the `creatorId` property of the entity is read and the relevant user account is obtained via the [Input object (type safe)](/v1/docs/en/core-root-entity-resolver) value resolver. - The second entry accesses the server-side state of the entity to be deleted via the [Original entity](/v1/docs/en/core-original-entity-resolver) value resolver (see note below), reads its `lastModifierId` property, and then obtains the user account in question via the [Input object (type safe)](/v1/docs/en/core-root-entity-resolver) value resolver. - The third entry reads the `ownerId` property of the entity to be deleted and obtains the relevant company account via the [Input object (type safe)](/v1/docs/en/core-root-entity-resolver) value resolver. - The [Collect values](/v1/docs/en/core-collect-resolver) value resolver concatenated with the [Create list](/v1/docs/en/core-create-list-resolver) value resolver extracts the `address` property from all list entries, using (not shown in the image) the "Unique values" option so that a notification is not triggered multiple times for the same "address" object. | ![images/download/attachments/78256018/image2022-8-5_18-48-6-version-1-modificationdate-1659718086077-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-8-5_18-48-6-version-1-modificationdate-1659718086077-api-v2.png) | | --- | --- | **NOTE:** The [Original entity](/v1/docs/en/core-original-entity-resolver) value resolver is important because the user responsible for deleting the entity is already referenced by `lastModifierId` in the context of the "Delete" event. However, the user who last sent to the server via "Save" for the entity is informed.