< Back
Print

Format strings

Summary

With the format “Format strings”, you can modify and standardize string values. It allows you to split a string using a separator, convert characters to upper or lower case, remove or add prefixes and suffixes, and define the length of the string. By specifying a separator contained in the string, the value can be divided into multiple parts. These parts can then be processed further as needed.

Example

Insert the attribute and select the format “Format strings” in the dropdown menu.

Click on the cogwheel for extended settings.
Here you can configure the format plugin.

Screenshot selecting Format strings format plugin

Value Description Example
Format of the source value Define how the input value is formatted CS::Formatted value (CS formatted)
Starting position of a character string This option configures from which position the string should start. (decimal number) 2
Maximum length of a character string (longer strings will be cut off) This configure the amount of characters how long the string should be for the system. (decimal number) (through negative numbers you can begin the amount at the end of the string) 9
Character string functions Here you can configure extra formattings for the characters. All characters as upper case/capital letters
Split at this character (returned as list and can be further transformed using the value range plugin) Splitting a string in different values. Insert the character (that is in the string e.g. “-“) from when the plugin should split the string.

Through another plugin the values can be further configurated.

(please see below)
Insert string at the beginning of the initial value (prefix) Set a prefix to the string
Insert string at the end of the inital value (suffix) Set a suffix to the string

Screenshot of how to configure the Format strings format plugin

Result from Example

Output without plugin
Screenshot result before formatting with the Format strings format plugin

Output with plugin
Note: The transformation (upper case, cutting the string) happens before the prefix and suffix get appended (In this example “ITEM_” and “_PROD”)
Screenshot result of the Format strings format plugin

Processing after splitting at specific character

For example, consider an attribute that stores multiple string values separated by commas.
Example Keyword List for Format Strings

You can then use the comma to split the string at this character. The result will be an array.
Configuration for keyword format strings example export

The result looks like this
Result example format strings format with keywords
The array can then be exported or undergo further processing.

Was this article helpful?
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Table of Contents