Concat strings

Value resolver – Abstract

Purpose: Concatenates an arbitrary number of substrings, which can be defined by direct input or via value resolvers.

images/download/attachments/177910803/image-2024-9-11_16-1-26-version-1-modificationdate-1726063285951-api-v2.png

The Concat strings value resolver concatenates an arbitrary number of substrings defined by direct input – i.e. as static text (see Static values) – or by value resolvers.

The value resolver does not expect an input value. However, the input value can be accessed via value resolvers to define substrings.

Configuration

The value resolver does not contain any configurations for substrings by default.

  • Clicking the images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/add.svg icon adds a new instance for configuring a substring (below the current instance, if necessary).

  • Clicking the images/s/-95e2zf/9012/8yg2g7/_/images/icons/emoticons/forbidden.svg icon removes the configuration for the current substring.

In the screenshot to the right, the Concat strings value resolver is used in concatenation with a static text value resolver that provides the string SCMU3216083 WHT/BLU 40ft as input value.

The Concat strings value resolver demonstrates both variants for defining substrings:

  • The first substring specifies a static text (BIC:) specified by direct input.

  • The second substring is defined by a Substring value resolver that accesses the input value of the Concat strings value resolver.

NOTE◄ Clicking on the small gray arrow at the bottom left of the window for direct input switches to the configuration view via a value resolver.

images/download/attachments/177910803/image-2024-9-12_8-21-10-version-1-modificationdate-1726122070229-api-v2.png

IMPORTANTWhen a substring configuration instance is added, the configuration should also be completed.

As long as the direct input – as shown in the following screenshot – displays the text 'No value', the value resolver runs an error at runtime:

images/download/attachments/177910803/image2022-6-28_16-37-51-version-1-modificationdate-1726062643652-api-v2.png

If, on the other hand, a configured value resolver returns the value 'No value' ($null), then no error occurs, but the substring is treated as an empty string.

If the return value for a substring is not a string according to its type, the string image of the return value is processed as a string.

Example

In the text of a message (see Show alert (Popup)), two sections from a given text are concatenated.

On the screen shot on the right, for demonstration purposes, the input value (as in the example above) as static text (SCMU3216083 WHT/BLU 40ft) is provided via concatenation. The message should reflect on the one hand the BIC code of the container (the first 11 characters from the input value) and on the other hand the size of the container (the last 4 characters from the input value).

Labels or semigraphics are 'interspersed' over statically defined substrings:

  • The first substring defines (as above) static text (BIC:) as a label

  • The second substring extracts (as above) the first 11 characters from the input value via Substring value resolver.

  • The third substring labels the size of the container by static text, also including a carriage return and semigraphic characters so that the 'SIZE:' appears as a detail in a tree structure below the 'BIC:'.

  • The fourth substring extracts the last 4 characters from the input value by a Substring value resolver.

images/download/attachments/177910803/image-2024-9-12_9-51-57-version-1-modificationdate-1726127516535-api-v2.png


Runtime example:

NOTE◄ Instead of the static input value, another 'data source' would of course have to be set up in a practical application.


images/download/attachments/177910803/image2022-6-28_16-19-41-version-1-modificationdate-1726062643667-api-v2.png