The String Action Type of String Replace performs search and replace functions within a field or variable. (Use this to find the positions of a group of characters in a string.)
Select the String Action Type up arrow and choose String Replace from the drop-down list. Select the String Replace up arrow and the String Replace window displays.
Find What – enter information about the string that you want to replace. Choose from:
Memory Variable – displays next to the Rule Command window. Drag a memory variable and drop it on the second text box.
Record/Field – displays next to the Rule Command window. Navigate down through a record to reveal the fields. Drag a field and drop it on the second text box.
Constant – Enter a value in the text box on the ECMap window that displays and select OK. The value is automatically entered in the second text box.
Select Ignore Trailing Space if you want the program to disregard blank spaces that may follow the value you are trying to replace.
Select Keep Trailing Space if you want the program to take into account blank spaces that may follow the value you are trying to replace.
Under Replace With, enter information about the string that will be used as the replacement. The choices include:
Memory Variable – displays next to the Rule Command window. Drag a memory variable and drop it on the second text box.
Record/Field – displays next to the Rule Command window. Navigate down through a record to reveal the fields. Drag a field and drop it on the second text box.
Constant – Enter a value in the text box on the WinMap window that displays and select OK. The value is automatically entered in the second text box.
You cannot enter a space as a replacement value. The
program will appear to accept the value, but then give you an error
on that command when you try to generate the map. You must define
a memory variable with a fixed value of space and then use that memory
variable as the replacement value.
Select Ignore Trailing Space if you want the program to disregard blank spaces that may follow the value you are using as the replacement.
Select Keep Trailing Space if you want the program to take into account blank spaces that may follow the value you are using as the replacement.
In the Search section, tell the program in what object to search and replace the string, where in the object to begin looking for the string to replace, and whether to search for all occurrences or a specific one. If you want to search for a specific occurrence (for example, the third occurrence), that value (in this example, 3) would be expressed as a constant or be found in a memory variable or a record/field. If you want to search for all occurrences, you would choose the Replace All option.
The choices for the object To Search include:
Memory Variable – displays next to the Rule Command window. Drag a memory variable and drop it on the second text box.
Record/Field – displays next to the Rule Command window. Navigate down through a record to reveal the fields. Drag a field and drop it on the second text box.
In Start Position, enter the variable name to store the returned value after a search.
Memory Variable – displays next to the Rule Command window. Drag a memory variable and drop it in the Start Position text box.
For the Occurrence, you can either search for all occurrences or the choices include:
Memory Variable – displays next to the Rule Command window. Drag a memory variable and drop it on the second text box.
Record/Field – displays next to the Rule Command window. Navigate down through a record to reveal the fields. Drag a field and drop it on the second text box.
Constant – Enter a value in the text box on the WinMap window that displays and select OK. The value is automatically entered in the second text box.
Replace All – REPLACE ALL is automatically entered in the second text box.