Concatenate Texts

Verb: concatTexts

Concatenates two or more texts, resulting in a new text.

Syntax

concatTexts --text(String) --value(String) (String)=value

Inputs

Script Designer Required AcceptedTypes Description
--text First text Required Text First text to be concatenated.
--value Second text Required Text Second text to be concatenated.
In this parameter, more than one text variable can be informed, or even a plain text and text variables together

Outputs

Script Designer AcceptedTypes Description
value Text Text Result of concatenating the two text inputs: First text and Second text, in that order.

Example

Example 1: Concatenates the texts of First text and Second text, with one variable in each input.

defVar --name firstText --type String --value IBM
defVar --name secondText --type String --value " Automation"
defVar --name concatenatedTexts --type String
//Concatenates the first text with the second, returning the result in the variable "$ {concatenatedTexts}".
concatTexts --text "${firstText}" --value "${secondText}" concatenatedTexts=value
logMessage --message "${concatenatedTexts}" --type "Info"
//This example produces the following result:
// IBM Automation.

Example 2: Concatenates the texts of First text and Second text, with two variables in the first input, and only one in the second.

defVar --name firstTextPart1 --type String --value This
defVar --name firstTextPart2 --type String --value is
defVar --name secondText --type String --value " just a sample text"
defVar --name concatenatedTexts --type String
//Concatenates the first text with the second, returning the result in the variable "$ {concatenatedTexts}".
concatTexts --text "${firstTextPart1} ${firstTextPart2}" --value "${secondText}" concatenatedTexts=value
logMessage --message "${concatenatedTexts}" --type "Info"
// This example produces the following result:
// "This is just sample text"