Working with Variable Extract Process
Process Purpose
The "Variable Extract" process is used for variables that contain strings with separators (ex: 5/10/B/H/X/7) - it extracts parts of that string based on a separator and stores the results into new variables. The position(s)/values between separators are considered fields.
You can parse up to 40 fields in one single "Variable Extract" process.
Check the provided "Variable Extract" 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 Extract" 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. |
Field Separator |
Select the field separator from the drop-down OR click to select it from within a variable. |
Extract Fields, Store Result into Variable(s) |
|
Field column |
The positions/values between separators are considered fields. Specify the extract field number in the source variable. Calculate the string's field number left to right. A negative value entered is interpreted as "starting from the end". So, “-1” means last field. Ex: String "10;7;DD;9;FFF" (a string with 5 fields): If you enter "2", the field is "7". If you enter "-1", the field is "FFF". |
Store Result into Variable column |
Click to select the variable to receive the extracted string. See To 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, click (on the upper right corner) and enter info about 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 click 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: 10;7;DD;9;FFF The defined separator is ";"
If a value is NOT found for the given position/field number, the extraction result will be "?".
|