--- title: "Modify list/Clear" slug: "core-modify-collection-actor-clear" updated: 2026-03-31T12:53:35Z published: 2026-03-31T12:53:35Z canonical: "docs.lobstersoftware.com/core-modify-collection-actor-clear" --- > ## 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/Clear *See also*: [Modify list/Remove](/v1/docs/en/core-modify-collection-actor-remove), [Is empty](/v1/docs/en/core-is-empty-matcher) (Compare type) The 'Empty' operation for the [Modify list](/v1/docs/en/core-modify-collection-actor) event action removes all entries from an existing list. **NOTE:** - A 'cleared' list still exists as a data object (JSON image: `[]`). Only the entries are removed. - 'Clearing' the list field of a data object is therefore not the same as assigning 'No value' (`$null`) to this field (see also [Equals](/v1/docs/en/core-equals-matcher) compare type). ## Configuration ![images/download/attachments/200672388/image-2025-2-11_17-26-16-version-1-modificationdate-1739291175605-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-2-11_17-26-16-version-1-modificationdate-1739291175605-api-v2.png) **NOTE:** After adding a [Modify list](/v1/docs/en/core-modify-collection-actor) event action to a workflow, the 'Add' operation is selected by default. Clicking on the icon for the option opens a context menu that allows a different operation to be selected. The symbol for the 'Clear' operation is the rubbish bin (see screenshot). The *value configuration* for the list to be modified must provide an updateable list at runtime. - Without a *value configuration* for the list to be modified (left), the *reference object* is automatically used in the context of the [Modify list](/v1/docs/en/core-modify-collection-actor) event action. - Without reference to an updateable list, the event action has no effect. > [!NOTE] > Notes on the selective removal of entries > > **IMPORTANT:** If not all but only certain entries are to be removed from an existing list, the 'Clear' operation is generally unsuitable. > > - If the primary aim is to obtain a specific subset of given list entries as a list, this can be obtained using the [Rule list resolver](/v1/docs/en/core-list-rule-resolver) with the option 'All values as list' and a suitable *check criterion* (see [Rule types](/v1/docs/en/core-association-rule)). > - The return value is then a copy of the original list in which all entries that do not match the *check criterion* (see [Rule types](/v1/docs/en/core-association-rule)) are missing (or appear 'removed'). However, the original list remains unchanged. > - However, a [Rule list resolver](/v1/docs/en/core-list-rule-resolver) can also be used to determine the subset of list entries to be removed and to process these cyclically in a [For each loop](/v1/docs/en/core-for-each-entity-actor) event action using [Modify list/Remove](/v1/docs/en/core-modify-collection-actor-remove). > > Exception: > > Some value resolvers for accessing attributes ([Attribute](/v1/docs/en/orchestration-rules-attributes), [Plural attributes (Resolver)](/v1/docs/en/core-plural-attribute-resolver), [Plural typed attribute resolver](/v1/docs/en/core-typed-attributes-resolver)) provide lists of attributes that represent a defined subset of the entries in the `attributes` field of the attribute owner. > > - The attributes returned as a subset can be removed from the `attributes` field of the attribute owner's list using [Modify list/Clear](/v1/docs/en/core-modify-collection-actor-clear). > - If the *attribute owner* (or the directly or indirectly superordinate entity) is subsequently saved, the relevant attributes are actually deleted. > > In this way, the 'Clear' operation is used to selectively remove a subset of entries from the list of all attributes, which is delimited by the parameterization of the value resolver used ([Attribute](/v1/docs/en/orchestration-rules-attributes), [Plural attributes (Resolver)](/v1/docs/en/core-plural-attribute-resolver), [Plural typed attribute resolver](/v1/docs/en/core-typed-attributes-resolver)). ## Examples ### Simple use case: Reset 'Company types' for copied company account When copying an existing company account (see [Companies/Clients](/v1/docs/en/base-company-account)), the multiple selection for the [Company type](/v1/docs/en/base-company-type) in the 'Company types' (`types`) field in the original should be automatically reset so that this selection must be deliberately made 'from zero' for the copied instance. Configuration: | Event handling is configured as shown on the right; As the only **Triggering event**, the 'Copy' event (see [Common action event](/v1/docs/en/core-common-action-event)) is selected. --- The **Validating rule** ensures that the 'copy' concerns an entity of the 'Company Account' (`CompanyAccount`) type. --- The only **Action on passed rule** is the [Modify list](/v1/docs/en/core-modify-collection-actor) event action with the 'Clear' operation: - The *value configuration* for the list to be modified is an [Object property](/v1/docs/en/core-property-resolver) resolver that addresses the 'Company types' (`types`) list field of the company account specified as the *reference object*. **NOTE:** The change should not be saved, but only applied to the volatile data status of the copy that appears in the context of an input form for [Users](/v1/docs/en/base-user) during copying. | ![images/download/attachments/200672388/image-2025-2-11_17-27-19-version-1-modificationdate-1739291238640-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-2-11_17-27-19-version-1-modificationdate-1739291238640-api-v2.png) | | --- | --- | ### Special use case: Reset 'Address contacts' for copied company account As an extension to the previous example, all 'Address contacts' with the [Contact type](/v1/docs/en/base-contact-type) 'Employee' (`EMPLOYEE`) should now also be removed from the company address (`address`) when copying a company. Configuration: | In the existing event handling, the [Modify list](/v1/docs/en/core-modify-collection-actor) event action shown on the right is supplemented with the 'Clear' operation: - The *value configuration* for the list to be modified concatenates two resolvers: - The [Object property](/v1/docs/en/core-property-resolver) resolver accesses the `address` field with the company address (attribute owner). - The concatenated [Plural typed attribute resolver](/v1/docs/en/core-typed-attributes-resolver) provides an attribute list with all instances for the **Typed attribute** 'address contact' (`AddressContact`) with the user-defined subtype 'Employee' (`EMPLOYEE`). | ![images/download/attachments/200672388/image-2025-2-11_17-28-44-version-1-modificationdate-1739291323494-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-2-11_17-28-44-version-1-modificationdate-1739291323494-api-v2.png) | | --- | --- | **NOTE:** This configuration removes all address contacts for 'Employees' in the data of the copy. Address contacts with a different [Contact type](/v1/docs/en/base-contact-type) continue to appear in the address of the copied company. The following configuration variant removes all 'Address contacts' in the copied data status: | The configuration shown on the right should replace the previous one. - As above, the [Object property](/v1/docs/en/core-property-resolver) resolver accesses the `address` field with the company address (attribute owner). - Where the [Plural typed attribute resolver](/v1/docs/en/core-typed-attributes-resolver) is used above, the [Attribute](/v1/docs/en/orchestration-rules-attributes) resolver is concatenated here to provide the attribute list to be cleared. | ![images/download/attachments/200672388/image-2025-2-11_17-29-19-version-1-modificationdate-1739291359108-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2025-2-11_17-29-19-version-1-modificationdate-1739291359108-api-v2.png) | | --- | --- | **NOTE:** The existing configuration can also be used for any other attribute type, including the 'Communication infos' *plural attribute type*. - For *non-typed* plural attributes (such as 'Communication infos'), there is also the dedicated [Plural attributes (Resolver)](/v1/docs/en/core-plural-attribute-resolver), which can also be used as an alternative. - Even if attributes for 'Communication infos' always contain a 'Type' (`communicationType`) field, you cannot use [Modify list/Clear](/v1/docs/en/core-modify-collection-actor-clear) to remove all attributes for a [Communication type](/v1/docs/en/base-communication-type) (e.g. `EMAIL`).