Change Text

The Change text building block changes a piece of text by applying an operation such as “substring” (get a smaller piece of the text), “concatenate” (add two pieces of text together) among many others.

Fully expanded, the Change text block shows the following properties:

Change-text

The Block Header (“Change text”)

There are no green input or output connectors in the header, because this building block is never explicitly executed. Rather, it is used to change a text value and deliver the result to other building blocks.

The title of the block (“Change text”) can be changed by double-clicking on it and typing in a new title.

Text to change

The original text to change.

The text can be dynamic by using tokens for added fields (see below). Right-click in the text and select “Insert token” to insert a field that has been added below.

Text fields

Add any number of fields that can contain dynamic content and be used as tokens in the text.

Method

The method to change the text using.

Method “substring”

Get a piece of text from within the original text. This method requires two sub-properties to be filled out:

  • Index: The first character position in the text to start the substring operation from.

  • Count: The number of characters to get from the text.

Method “Replace”

Replace all occurrences of a piece of text with another piece of text. This method requires two sub-properties to be filled out:

  • Old value: The value to find and replace in the text.

  • New value: The value to replace the old value with in the text.

Method “Concat”

Concatenate (add) two pieces of text together. This method requires one sub-property to be filled out:

  • Text: The text to concatenate (add) to the existing text.

Method “Uppercase”

Change all characters from the original text to UPPERCASE.

Method “Lowercase”

Change all characters from the original text to lowercase.

Method “Index of”

Within the original text, find the position of the first occurrence of a piece of text. This method requires two sub-properties to be filled out:

  • Subtext: The value to find the index of in the text.

  • Occurrence: The occurrence of the value to find the index of in the text.

Method “Last index of”

Within the original text, find the position of the last occurrence of a piece of text. This method requires two sub-properties to be filled out:

  • Subtext: The value to find the index of in the text.

  • Occurrence: The occurrence of the value to find the index of in the text, starting at the end and moving backwards.

Method “Length”

Count the number of characters in a piece of text.

Method “Trim”

Remove all of the whitespace, or other specific characters, from the start and end of a piece of text. This method requires one sub-property to be filled out:

  • Trim characters: One or more characters to trim from the text.

Method “Pad left”

Add specific padding characters to the left (front) of the text. This method requires two sub-properties to be filled out:

  • Pad characters: One or more characters to pad the existing text with on the left side.

  • Length: The desired length of the text after padding.

Method “Pad right”

Add specific padding characters to the right (end) of the text. This method requires two sub-properties to be filled out:

  • Pad characters: One or more characters to pad the existing text with on the right side.

  • Length: The desired length of the text after padding.

Result text

The changed text as the result of the operation.

 

Updated February 1st 2017.