Text Codeblocks Reference

What's New: 2027

The Text category provides blocks for creating and manipulating strings, plus iLogic snippets for combining text and comparing strings with optional case sensitivity. Use these blocks to handle all your text-processing needs within Codeblocks.

Note: In the following content, "letters" can refer to upper case, lower case, numbers, punctuation marks, other symbols, and blank spaces between characters.

Text

The Text codeblock is used to enter a string of characters. The text can contain letters (lower-case or upper-case), numbers, punctuation marks, symbols, and blank spaces. Carriage returns are not supported.

Note: The Text Codeblock can only display 50 characters. Beyond 50 characters an ellipses (three dots '...') will display. The full string is saved in the text codeblock, but when you are done editing only the first 50 characters can be seen.

Create Text With

The Create Text With codeblock is used to combine (concatenate) multiple text strings.

Drag and drop text inputs as needed to the input side of the codeblock and additional input connections are added.

Convert to Text

The Convert to Text codeblock converts a number or object to a text string.

Append Text

The Append Text codeblock adds a text string to the text held in a variable.

The variable 'item' is used by default, and is created if the variable doesn't exist.

Count Text

The Count Text codeblock returns the number of characters, including spaces, in the provided text.

Is Empty Text

The Is Empty Text codeblock returns true if the input contains an empty text string.

In Text

The 'in text' codeblock is used to look for text strings within a text string. The search is case sensitive.

The in text codeblock returns a number, indicating where the input string appears in the text.

Use the control to find the first, or last position of the string to be searched, within the text.

Get Character

The ‘get character’ Codeblock extracts a single character (letter) from a string (some text), by position.

The string is interpreted as a list of characters, and characters can be extracted from the list using their position, or number in the list.

The letter returned includes the case of the letter.

The get character Codeblock has the following options:

Get Substring

The ‘Get substring’ Codeblock extracts a consecutive series of characters (letters) from a string (some text).

The string is interpreted as a list of characters, and characters can be extracted from the list using their positions, or numbers, in the list.

The letters returned include the case of the letters.

The get substring Codeblock has the following options:

Case

The Case codeblock returns the input text in a different case.

The Case codeblock has the following options:

Trim Spaces

The trim space codeblock removes space characters (blanks) from the ends of a string (text).

The trim space codeblock has the following options:

Print

The print codeblock prints text to the iLogic Log. To make the log visible, select the following option from the ribbon: View Windows User Interface iLogic Log.

Tip: Dock the iLogic Log to the bottom of the window so longer lines display without word wrapping.

Prompt for Message

The Prompt for codeblock enables prompting for text or number with the provided message.

Count Text

The Count Text codeblock returns the number of times the first provided text occurs within the second provided text.

Replace Text

The Replace Text codeblock searches within a provided text for a specified substring. When it finds the substring, it replaces it with a provided substring.

Compare

The Compare codeblock evaluates two text strings to see if they are equal. Click the plus (+) to access case options.