--- title: "All map keys" slug: "core-map-keys-resolver" updated: 2026-05-19T08:22:48Z published: 2026-05-19T08:22:48Z canonical: "docs.lobstersoftware.com/core-map-keys-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. # All map keys > [!NOTE] > **Value resolver – Abstract** > > **Purpose:** Returns a list of all key values of a *map* or all field names of a "client object" in the *input value.* > > > [!TIP] > > Tooltip > > > > - **Usage**: The value resolver expects a *map* or a "client object" as *input value*. It returns the key values or field names as a list. If the **Key type** or **Is collection of** parameters imply a type check, and an entry fails that check, the return value is `$null` instead. > > - **Parameter**: > > - A **Key type** can be **optionally** selected for a *map* to declare the type of list entries to expect for the return value. > > > > **IMPORTANT:** To access the field names of a "client object" in the *input value*, the **Key type** "String" must be explicitly selected. > > - The **Is collection of** option can be used to declare that the key values in a *map* are lists. > > > > **IMPORTANT:** The selection of a **Key type** in connection with **Is collection of** acts exclusively as a declaration. The type of list entries that are key values is **not** checked. > > - **WARNING:** > > - If a **Key type** is selected, the return value is `$null` if an entry is found at a *check-relevant list position* in the return value that does not correspond to the **Key type**. In the server context, only the first 5 list entries are *relevant for checking*, whereas in a [Client Workflow](/v1/docs/en/frebehav-client-workflow) **all** list entries are checked. ![images/download/attachments/177910371/image-2024-9-10_9-15-3-version-1-modificationdate-1725952502792-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-10_9-15-3-version-1-modificationdate-1725952502792-api-v2.png) The "All map keys" value resolver expects a *map* or a "client object" as *input value*. It returns a list of key values for a *map*, or a list of field names for a "client object". The **Is collection of** and **Key type** parameters declare the expected data type of the return value within the configuration context. - If the input object is a "client object", however, the **Key type** `String`, which is not an alternative in this context, **must** be selected explicitly. - In the context of a *map*, there are no restrictions on the data type of key values. Lists or complex data objects can also be used as keys. - All key values of a *map* typically correspond to the **same** type. If this is known for the specific use case, then this type should be selected as the **Key type**. - However, the same *map* can easily contain key values of different types. In this case, the selection for the **Key type** should be omitted unless a parent class can be selected as the **Key type** which corresponds to all key values used in the map. > [!WARNING] > **IMPORTANT:** > > Unlike many other value resolvers that offer a "type" selection in conjunction with an **Is collection of** option, the "All map keys" value resolver **ignores** the selection for the **Key type** when the **Is collection of** option is **checked**. Therefore, by combining the two parameters, it is not possible to specify that all key values **must** be of a certain type. Nevertheless, for the context of the configuration, the return value is **declared** accordingly, e.g. `Long[][]`, i.e. a list of key values which in turn list `Long` values. An individual "check" per key value – i.e. a check whether its entries correspond to the **Key type** – does **not take place**. ## Configuration The following table defines the characteristics of the value resolver per case distinction for all technically representable variants independent of their practical relevance: | Input value type | "Is collection of" option | "Key type" parameter | Return value | Notes | | --- | --- | --- | --- | --- | | ***Map*** | *irrelevant* | `List` | List of all key values,IF they correspond to the type "list" at *check-relevant list positions*– OTHERWISE: "no value" (`$null`) | **CAUTION****:** --- ***List items relevant to the check*** *are:* - In the server context: **only the first 5 entries**, - In the client context: **all** entries. The term "entry" always refers to the list of key values of the *map* and not a list that is used as a key value within a *map*. The sequence of the key values of a *map* does **not** generally correspond to the sequence in which they were added to the *map*. **IMPORTANT:** **No** automatic type conversion takes place in the context of checking against a **Key type**. However, the **Key type** can be a *parent* class (e.g. "Entity" or "Interface > User") to which various other classes correspond. | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(34).svg) selected | *other type than* `List` or *no selection* | | ![](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-U84KXOHW.png) deselected | *other types* | List of all key values,IF these correspond to the **Key type** at *check-relevant list positions*– OTHERWISE: "no value" (`$null`) | | *no selection* | List of all key values. | *none* | | **Client object** | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/error.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/error(27).svg)deselected | `String` | List of all field names of the "client object". | | *irrelevant* | *other type than* `String` or *no selection* | "no value" (`$null`) | | ![images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/check.svg](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/check(34).svg) selected | *any type* | ## Examples ### Simple use case: Loop over all data in a map A *map* is used to represent the seat reservation for a scheduled flight. The *map* uses the alphanumeric identifiers of the seats as key values, which consists of the number of the seat row (1, 2, ...) and the code letter of the seat position within the row (A, B, C, etc.). If there is a reservation for a seat, the corresponding key value is assigned a string that identifies the passenger in the usual manner `<last name>/<first name[n]><address>`. The assumption is that there is a key value in the *map* only for **reserved** seats. In the context of event handling, all existing reservations for a specific flight are already available as data in this *map*. For control purposes, a notification is to be issued for each reservation. **Configuration:** | In the header of the [For each loop](/v1/docs/en/core-for-each-entity-actor) shown on the right, the [All map keys](/v1/docs/en/core-map-keys-resolver) value resolver is used to obtain a list of the seat numbers for all reserved seats. - The **Save Object in variable** parameter is used to access the *map* as a whole via the `bookings` variable when it is no longer a *reference object* within the loop. - The **Key type** "String" should only be selected if it is ensured that the *map* contains only key values that correspond to this type. - The **Is collection of** option must not be checked. Although a list of "text keys" (`String[]`, see image) is expected as return value, each individual key value is supposed to be a simple `String` (and not a list). Within the loop, a [Show alert (Popup)](/v1/docs/en/core-popup-actor) event action outputs the seat reservation information contained in the *map* as a notification of **Type** "Info": - In the **Title**, this accesses the key value itself, whose `String` value is present in the loop as a *reference object*. The [Object property](/v1/docs/en/core-property-resolver) value resolver (without field) supplies this *reference object* of the iteration completely. - The **Message**, on the other hand, is intended to identify the passenger for whom the seat reservation is made: - To do this, the entire *map* must first be accessed via the variable bookings using the [Variable](/v1/docs/en/core-storage-value) value resolver. - The concatenated [Map item](/v1/docs/en/core-map-item-resolver) value resolver addresses the **Key** for the current seat within the *map*. To identify this, the [Variable](/v1/docs/en/core-storage-value) value resolver is used again, this time to read the *reference object* within the iteration, which the system automatically provides via the `entity` variable. Here the expected **Item type** ("string") is specified. **Runtime example:** (Extract from a longer "passenger list") ![images/download/attachments/177910371/image2022-11-22_12-23-58-version-1-modificationdate-1725892531751-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-11-22_12-23-58-version-1-modificationdate-1725892531751-api-v2.png) | ![images/download/attachments/177910371/image-2024-9-10_8-48-43-version-1-modificationdate-1725950923180-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-10_8-48-43-version-1-modificationdate-1725950923180-api-v2.png)![images/download/attachments/177910371/image-2024-9-10_8-50-5-version-1-modificationdate-1725951004621-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-10_8-50-5-version-1-modificationdate-1725951004621-api-v2.png) | | --- | --- | ### Simple use case: List field names of a "client object" In the context of event handling, a SELECT statement is executed via a [Value from SQL query](/v1/docs/en/core-native-sql-value) value resolver for a database table in a database that can be accessed by the **Lobster Data Platform/Orchestration** server via an alias. If the specific SELECT statement returns any result rows at all, the value resolver returns them as a list of "client objects", each of which represents a data set. The fields of each of these client objects contain the data of the data set. The field names are derived from the projections in the SELECT statement. In the example, we execute a PostgreSQL statement according to the schema `SELECT * FROM <table_name> LIMIT 1` to read the first row of a database table **completely** without having to know its structure explicitly. Afterwards, a list of field names is output informatively via a notification. **Configuration:** | The [Execute with](/v1/docs/en/core-with-actor) event action shown on the right defines the first "result row" from the SQL statement defined in the [Value from SQL query](/v1/docs/en/core-native-sql-value) value resolver as the *reference object* for the output of the notification in the action part. - Since the [Value from SQL query](/v1/docs/en/core-native-sql-value) value resolver also returns a "list" if a query returns exactly one "row" as a result, the [List item](/v1/docs/en/core-list-item-resolver) value resolver is used here, which addresses the first list entry by **Offset** `0`. As can be seen in the image, "Object" is shown as the type for its return value, since no specific object type is defined for the "List item" from the SQL query. They are "client objects" with variable structure. - A [Show alert (Popup)](/v1/docs/en/core-popup-actor) event action is executed in the action part, which defines the static text "Table fields" as the **Title**. - In the **Message** the [All map keys](/v1/docs/en/core-map-keys-resolver) value resolver returns all field names of the (client) object present as *input value*. Thereby, the selection of "String" as **Key type** is required exceptionally. - The concatenated [Replace text](/v1/docs/en/core-replace-string-resolver) value resolver was added here only to replace spaces in the `String` image of the supplied list of field names with a line break. | ![images/download/attachments/177910371/image-2024-9-10_9-8-4-version-1-modificationdate-1725952083636-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-10_9-8-4-version-1-modificationdate-1725952083636-api-v2.png)![images/download/attachments/177910371/image-2024-9-10_9-8-55-version-1-modificationdate-1725952134864-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-9-10_9-8-55-version-1-modificationdate-1725952134864-api-v2.png) | **Runtime example:** ![images/download/attachments/177910371/image2022-11-22_14-47-49-version-1-modificationdate-1725892531746-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-11-22_14-47-49-version-1-modificationdate-1725892531746-api-v2.png) In the example, the SQL statement was: `SELECT * FROM dw_log LIMIT 1` ... with the "Alias" `hub `(default for the database of the *embedded data*) **NOTE:** In the context of a loop, a list of field name/field value pairs could also be output, where the [All map keys](/v1/docs/en/core-map-keys-resolver) value resolver and the [Map item](/v1/docs/en/core-map-item-resolver) value resolver must be used in tandem, similar to the previous example. | | --- | --- | --- | ## See also - [Map item](/v1/docs/en/core-map-item-resolver)