Join string list

See also: Concat strings, concatWs (Concatenate texts) für Calculation expression, Split text (Umkehrfunktion)

Value resolver – Abstract

Purpose: This concatenates character strings that are taken or obtained from entries in a list provided as an input value into a common string via an optionally definable Delimiter.

images/download/attachments/167859217/image-2025-3-4_17-6-19-version-1-modificationdate-1741104379110-api-v2.png

The Join string list resolver concatenates strings that are taken or obtained from the entries of a list provided as input value into a common string via an optionally definable Delimiter.

The following special cases must be distinguished:

  • If the input value is ‘No value’ ($null), the return value is also ‘No value’ ($null).

  • If a list entry is a data type other than text (String), its string image is used.

  • If there is an input value that is not considered a ‘list’ in Lobster Data Platform / Orchestration, it is treated as if it were the only entry in a list. The value itself or its string image is therefore the return value.

NOTE◄ If a list contains ‘No value’ ($null) as an entry, the string image is an empty string ‘’ (and not null). If no Delimiter is defined in this case (default), then the impression could arise that empty entries are completely ‘skipped’. In conjunction with a Delimiter, it is immediately apparent that this is not the case.

Configuration

The list with the entries to be converted into a continuous string is expected as an input value, which is transferred from the predecessor in the context of a concatenation (see Chained resolver) or is available as a reference object.

The optional Delimiter parameter can either be provided as Text via direct input (see screenshot top right) or – after clicking on the small grey arrow at the bottom left of the Text field displayed by default – determined by a value configuration, the return value of which is determined at runtime and transferred to the return value (possibly as a string image) (see screenshot bottom right).

Both methods can be used to assign a single ‘Delimiter’ as well as any longer text value, which may appear repeatedly in the return value.

NOTE◄ The Delimiter is ‘inserted’ after every list entry except the last one in the returned text value, i.e. with length – 1 repetitions (length is the number of list entries).

images/download/attachments/167859217/image-2025-3-4_17-6-36-version-1-modificationdate-1741104396439-api-v2.png


images/download/attachments/167859217/image-2025-3-4_17-7-11-version-1-modificationdate-1741104431553-api-v2.png

Examples

Simple use case: Concatenate text values

A Variable iata_codes is used to provide a list with a flexible number of IATA codes for airports, which describes a ‘route’ that is flown in the given order.

In a notification, the listed iata_codes are to be merged via text concatenation using the text ‘’ (an arrow symbol between two spaces) as a Delimiter.

Runtime example:

images/download/attachments/167859217/image-2025-3-4_15-31-45-version-1-modificationdate-1741098705344-api-v2.png

Configuration:

In the screenshot on the right, an Execute with event action provides the Variable iata_codes as a temporary reference object for the contained action block.

  • The configuration for the Variable value resolver makes it clear here that the IATA codes should be available as a list of entries with the Type String. The type hint for the action block is then String[].

  • A Show alert event action is executed in the action block:

    • The Title ROUTE is assigned as Text.

    • The Message can be generated here directly as the return value of a Join string list resolver.

      • The Delimiter is again assigned directly as Text.

        NOTE◄ The spaces at the 'margins' are not easily recognisable in the screenshot. They improve the readability of the return value for ‘human’ recipients, as the ‘right arrow’ (Alt+26) special character is very close to the text characters without spaces.

images/download/attachments/167859217/image-2025-3-4_17-7-52-version-1-modificationdate-1741104471996-api-v2.png

Simple use case: Linking address features to a ‘matchcode’

Selected characteristics of an address (see Addresses) should be linked via the underscore (‘_’) as a delimiter to form a ‘matchcode’, which can be used, for example, to look up an address in an external system or to recognise and merge redundant variants of an address.

The ‘concatenation scheme’ stipulates that the text components for the relevant ‘Name’ (name1), ‘Name 2’ (name2), ‘Name 3’ (name3), ‘City’ (city) and ‘Country’ (countryCode) address fields, should be included in the ‘Matchcode’ in this order and converted to capital letters, if they contain any value at all.

Runtime example:

images/download/attachments/167859217/image-2025-3-4_16-12-56-version-1-modificationdate-1741101176362-api-v2.png

NOTE◄ The matchcode shows that only two name fields are filled in the address, but not which ones are involved. This should not play a role for the matchcode. The fact that fields without a value are effectively skipped (including the delimiter) and there is a variable number of visibly concatenated components, is a clear argument in favour of using the Join string list resolver over the Concat strings resolver, which only provides an inflexible concatenation scheme.

Configuration:

The screenshot on the right shows how the Join string list resolver can be used in the context of a reference object of the ‘Address’ (Address) type to map the ‘Matchode’ to a Variable matchCode in accordance with the rule described above.

The assignment enables a Set value event action here:

  • On the left-hand side, a Variable resolver defines a variable with the name matchCode as the target for the assignment. The selected Type (String) makes it clear that a string is expected.

  • On the right-hand side of the assignment, the assigned value is defined by a value resolver chain (see Chained resolver):

    • The Create list resolver initially defines the composition of the address fields including their sequence as entries in the list via a series of value configurations with Object property value resolvers.

    • The concatenated Collect values resolver converts the text values provided as a list into uppercase letters using the Upper case value resolver ‘attached’ in the Value to collect parameter.
      IMPORTANT◄ All fields without a value are ‘automatically’ missing from the returned list because Collect values skips them.

    • The Join string list value resolver then only has to concatenate the shortened list using the Delimiter _’.

images/download/attachments/167859217/image-2025-3-4_17-8-48-version-1-modificationdate-1741104528024-api-v2.png

NOTE◄ As the ‘Country’ (countryCode) field does not directly contribute a text value but a value from the Country dynamic enumeration, the string image for the enumeration value is brought into play (here: by the Upper case resolver). It should be noted that the string image for an enumeration value is defined differently for the server context and the client context. The example given is for the Country ‘Germany’, which is internally labelled DE based on the ISO alpha2 code. This only applies in the server context as a string image (see runtime example), while in the client context the applicable localisation (by default ‘Germany’) is returned as a string image. If necessary, a matching string image can be enforced here regardless of the context by explicitly referencing the ‘Name’ field of the enumeration value (countryCode.name) when reading access to the ‘Country’ (countryCode) field.