Working with Variable Parse String Process

Navigation:  How to Work with Processes > Working with the Variable Processes Group >

Working with Variable Parse String Process

Previous pageReturn to chapter overviewNext page

 

Process Purpose

 

The "Variable Parse String" process is used to parse data from a variable and store the result in another variable.

The parsing is done within a position range. It starts when the “Start string” is found and stops when the “End String” is found or when the specified number of characters is achieved.

The parsing process can search for a specific occurrence of the parsing condition.

The position of the first character, after the parsed data, can be saved in a variable for later use.

Check the provided "Variable Parse String" examples at the end of the topic.

 

 

When you add a process, you are required to define its settings. This occurs in the process's properties window which is displayed automatically after having added the "Variable Parse String" process.

If any subsequent edition is required, double-click the process to open its properties window and enter the necessary modifications.

 

 

Fill in the following options:

 

Source Variable

Variable

Click to select the source variable with the data string to parse. See Variable Usage.

From Position

Define the initial position for the parsing scope, meaning, the starting point to be considered for the parse condition.

To Position

Define the final position for the parsing scope, meaning, the end point to be considered for the parse condition.

If you want the scope's final position to be the final character of the data string included in the source variable, maintain the default value "0".

Parse

Start String

Define the initial character(s) of the string to be parsed. Either click to select it from within a variable OR  enter it directly into the box.

To

Use one of the following to define the final character(s) of the string to parse:

Check "End String" and enter the intended character(s) into the corresponding box or click to select the variable with that value.

OR

Check "Length" and insert the specific number in the resulting box.

Occurrence

Define an occurrence criterion by checking “First”, "Last” or “No” (in this last case, specify the number in the resulting option).

Case Sensitive

Check this option to force a lower/upper case comparison for the defined string parsing.

Results

Result Variable

Click to select the variable that will receive the parsed string. See To Select/Create a Variable.

Result Next Position (End+1) (Optional)

If required, click to select the variable that will receive the position of the first character after the parsed data + 1 position.

Result Number of Data Found (Optional)

Click to define a variable that will store the number of times the string to parse was found between the intended occurrence and the start position of the parse scope (occurrences are counted right to left).

If not Found Go to

Define a target location, in case any of the given elements for the parsing operation are not found. Either use a destination from the drop-down list or select one from the list. See Detail of a window below.

 

When defining a screen as a target destination (ex: via a “Go to” process), you CANNOT use variables to specify the name of that target screen. You must select the intended screen from the available drop-down/list.

 

 

Detail of a window:

 

 

"S:Menu" is a screen included in the same program as the process.

"R:Routine_1" is a routine included in the same program as the process.

 

If required, click (on the upper right corner) and enter info on this process in the resulting text box. These notes will be displayed in the corresponding "Actions" tab or "Process" window (in the "Notes" field) and in the "Developer Report".

 

After filling in the required options, click to conclude or to abort the operation.

The added process is displayed in the corresponding "Actions" tab or "Process" window.

 

 

If you want to use a label as a target destination, you can use the "Auto-Label" mechanism. This alternative to the "Set Label" process allows you to create a label in the properties window of a process - specifically, in the fields used to define target destinations (ex: the "If Error..." type fields).  See To Automatically Create a Label.

 

 

Use the right-click in MCL-Designer's input boxes to access some related options as well as the general "Cut", "Copy"; "Paste"; "Search" actions (active/inactive according to the current context).

Ex: If you right-click the "Variable" input box (included in a "Conversion's" properties window), you are provided with general editing/search actions and other more specific options such as "Variable Select" (see "Variable Select"); "Variable Insert" (see "Variable Insert"); "Insert Special Character" (see To Insert Special Characters into a Control's Text Input Field) and "Localization Select" (see Localization List).

If you right-click another input box, it may provide other possibilities.

 

 

 

Click Here for Examples of "Variable Parse String" Results