Datamax v1.1x Printer User Manual


 
Copyright © 2007 • MCL Technologies • All Rights Reserved
www.mcl-collection.com
Chapter 5 : Using Processes
5.8.7. Variable Search and Replace
General introduction The Variable Search and Replace process allows you to search for a
specific character or a string of characters inside a variable and if found,
the string will be replaced by another character or string of characters.
The command parameters include the:
Starting position of the search
Selection of the "First", "Last" or a specific occurrence inside the
variable.
Variable Search and
Replace
To search and replace a character or a string of characters inside a
variable, proceed as follows
:
1 Add the process Variable Search and Replace to your label
program
2 In the Input Value box, select the input variable to be searched.
3 In the Search Value box, the character or string of characters to
be used in the search. This can also be a variable if the search
criteria is contained in a variable.
4 In the Replace Value box, type the character or string of
characters or select a variable containing the character(s) to be
used as the replacement value.
5 Select the occurrence of the criteria:
first occurrence in the input variable after the "From Position”,
last occurrence in the input variable before the "To Position”,
specific occurrence between the "From Position" and "To
Position”
6 To search for a specific occurrence, simply type the occurrence
number in the Occurrence box.
7 Select the From Position and To Position. These entries define
the area within the input variable where the search starts and
stops.
8 Click beside the Result Variable box.
9 Select or create the variable to receive the replaced contents and
click OK.
10 Click OK
Examples In this example, if the following Variable Search and Replace process is
run with:
[B4] = 001234.569
Then,
[B9] = 003214.569
October 2007 Page
169