Working with Variable Search/Replace Process

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

Working with Variable Search/Replace Process

Previous pageReturn to chapter overviewNext page

 

Process Purpose

 

The Variable Search/Replace process is used to perform a search for a string inside a variable and replace that string with another one.

 

 

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 Search/Replace 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 variable where the search will be performed. See Variable Definition.

From Position

Define the position, within the string, from which it will be parsed ( a search for the string to replace).

To Position

Define the position, within the string, that marks the end of the parsing (a search for the string to replace). If set to zero, the string will be parsed to the end.

Search

Data

Define the string or variable to search. Enter it or click and select a variable with that string.

Occurrence

Define the parsing criteria:

All - whenever the string to remove/replace is found.

First - Only the first time the string to remove/replace is found.

Last - Only the last time the string to remove/replace is found.

No - Define a number of occurrences (of the string to be removed/replaced) between first and last position. Check the "Nr" option and insert the number of occurrences in the newly activated box.

Replace By

Define the string that will replace the string that was parsed and found. Either enter it or click and select a variable with that value.

Results

Result Variable

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

Number of Replacement (Optional)

As an option, click to select a variable to receive the number of string replacements. See To Select/Create a Variable.

 

If required, use the icon on the upper right corner of the properties window:

 

Use the icon to attach any relevant notes 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 certain features regarding the input box's option as well as general actions such as "Copy"; "Paste"; "Search".

Ex: If you right-click the "Variable" input box (included in a "Conversion's" properties window), you are provided with the "Search..."and "Variable Select" options.

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