String Builder
The String Builder action builds a string from multiple constants and variables. This can be used to build (or concatenate) a single output string from multiple strings variables and constants.
Parameter descriptions
Parameter | Description |
---|---|
Format String | Enter the set of text and
substitution variables that are used to
build the single output string. The Input tab appears when you type the first substitution variable in the form of $(). For example: $(TEMP). A row is added to the Input tab for each substitution variable, in this example TEMP. If you want to include a $ character as part of the text, you must use double $$ characters. Otherwise, the $ character will not appear in the output. For example: $$5.75. |
Maximum Output Size | Available when the Use
Advanced Properties checkbox
is selected. Defaults to 1024. This parameter controls the maximum size of the Output parameter on the Output tab. |
Input tab
The Input tab appears when you type the first substitution variable in the form of $() in the FormatString parameter. The Input tab lets you map substitution variables to variables or constants.
Parameter | Description |
---|---|
Name | A row is added to the
Input tab for each
substitution variable, in the example
TEMP, VATID and BATID would be the
added rows. The substitution variable is mapped to any trigger macro, constant, started device variable, trigger local variable, trigger static variable or trigger event variable by selecting the Value cell for the row. Once the cell is selected, a drop down list of the available items is displayed. |
Output tab
Parameter | Description |
---|---|
Output | The output variable that receives
the result of the multiple input
parameters and text concatenated into a
single string. For the example Format String: Temperature $(TEMP) celcius from vat $(VATID) batch $(BATID) Where:
|
Supported control characters
The String Builder action supports control characters for the output of the action.
The following control character patterns will be accepted:
Pattern | Result |
---|---|
\t | The tab character |
\r | The line feed character |
\n | The new line character (0x0A) |
\xNN | Any character specified in
hexadecimal notation, for example \x35
will print the number 5. Warning: use of \x00 to specify an embedded null should not be used. |
\0 | Null - not supported for embedded nulls. String functions that use the length of the string when processing will not give the expected results. |
![]() |
Places a backslash \ character |