Contact Us 1-800-596-4880

Combine Strings

The Combine Strings Action Step allows multiple variables to be combined into a single new variable. Script variables, environment variables and Pin variables can be used. Text can be inserted before, after, and between variables.

Properties

Pattern Text This text defines the sequence in which variables and texts will be concatenated.

Inbound Variables

Pattern This text defines the sequence in which variables and texts will be concatenated.

Outbound Variables

Combined String The combined strings stated as a single string, as defined in the Pattern Text

Wizard

The wizard contains the pattern text field which can be edited, two drop-down lists of script and environment variables, and links to the Pin variables.

Clicking on the name of a variable from the list adds a reference to this variable to the text field. You can also enter your own text into this text field.

The pattern in the figure was generated by first linking the Pin ActivityParameters.ap_alpha1 and ActivityParameters.ap_alpha2 to the Action Step via the Edit Variable Mappings window. The text Variable 1: was then inserted followed by link {1}: ActivityParameters.ap_alpha. After the text – Variable 2: was added, the second link was clicked on.

Pin variables are inserted into the pattern as syntax \{[number in the list of all Pin variables]}, environment variables as %[name of variables]%, and script variables in the form ($[name of variables]).

After all variables are included, the Pin variable Combined String will contain the result in the form of a single string.

The Pin variables to be used must be linked with the Action Step using the pin symbol before opening the wizard. The maximum number of Pin variables in a Combine Strings Action Step is five. Combine Strings variables can be combined using the Combine Strings Action Step.

Example:

Macro {1} is bound to variable ActivityParameters.ap_alpha1 and Macro {2} is bound to variable ActivityParameters.ap_alpha2. The following table represents the values of both variables and how they translate to a new variable using different Pattern Texts:

ActivityParameters.ap_alpha1 ActivityParameters.ap_alpha2 Pattern Text Output Variable (Combined String)

mulesoft

com

www.{1}.{2}

www.mulesoft.com

mulesoft

Info

www.{1}.{2}

www.mulesoft.info

Ms

Miller

Dear {1}. {2},

Dear Ms. Miller,

Mr

Johnson

Dear {1}. {2},

Dear Mr. Johnson,

Lorem

Ipsum

{1}{2}

LoremIpsum

Lorem

Ipsum

{2}{1} - {1}[2}

IpsumLorem - LoremIpsum