Working with Variable Substring Process
Process Purpose
The "Variable Substring" process is used to extract parts of a variable and store the results into new variables.
You can define up to 20 variables to receive data from a single source variable.
Check the provided "Variable Substring" 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 Substring" 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 |
|
Click to select the source variable with the data to extract. See Variable Usage. |
|
Substring |
|
From Pos. column |
Define the initial position of the substring in the “Source Variable” to extract. If required, you can use negative values, in which case, the initial position is always calculated from the end of the string. A negative value entered is interpreted as "starting from the end". So, “-1” means last position. Ex: String "ABCDEFG" (a string with 7 positions): If you enter "2", the initial position is "B". If you enter "-3", the initial position is "E". |
To Pos. column |
Define the final position of the substring in the “Source Variable” to extract. If you have defined the initial position with a negative value (the position is calculated from the end of the string), the default value is "End". As an alternative, you can forgo this option (leave it blank) and determine a length in the next option. |
Length column |
Define the length of the substring in the “Source Variable” to extract. This option considers the value you have set in the "From Pos" option. Using this option means you do NOT define a value in the "To Pos" option. |
Store Result into Variable column |
Click to select the variable that will receive the extracted substring. SeeTo Select/Create a Variable. |
Use the editing icons to the right of the table to move the rows up and down and to delete or add more rows.
If required, use (on the upper right corner) to attach info to this process. Click it and enter your notes 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.
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.
String to be read for extraction: ABCDEFG
|