Edit the Data by Searching for a Specific String
Double-click the Data Exchanger component icon . The Data Exchanger Component Editor appears.
From the Data Exchanger Component Editor, select
a General Data section.
In the Parameters table, click the parameter
that is bound to the swipe that you want to update.
In the Swipe Details area, select
Find from the first
list.
In the Find text box, enter text from the file.
The matching text in the data source is highlighted automatically.
Click the button to adjust the search direction (forward/backward).
In the from list, select where the search starts:
Option |
Description |
Start of File |
Start the
search from the beginning of the file. This is the default. |
Current |
Start the search
from where the last read/write occurred. This can be much more efficient
when working near the end of a large file. Be aware of where the statement
will be inserted in the list of actions—the “last read or write”
is the last one before the new statement—which can be an unexpected
value if the insertion point is not at the end of the list of actions. |
End of File |
Start the
search backward from the end of the file. |
From the list in the center of the General Data Swipe
area, select String or Regexp
(regular expression). Regular expressions are a way to specify patterns
that match similar strings. For example, the regular expression ‘a
*b’ matches an ‘a’, zero or more
spaces, and a ‘b’.
In the Occur text box, determine the match to
use if the search string occurs multiple times. The default is the first
match 1, searching from the value you selected in the
from list. If you enter a 2 in
this text box, the second match will be used, etc.
In the Offset Lines text box, enter the number
of lines you want to add before or after the location of the found data.
Negative numbers select a line before the matched line; while positive
numbers select a line after the matched line. You can also select an
offset from a marker.
Click OK to save your changes and to close the
Data Exchanger Component Editor.
Edit the Data by Selecting the Line Number
Double-click the Data Exchanger component icon . The Data Exchanger Component Editor appears.
From the Data Exchanger Component Editor, select
a General Data section.
In the Parameters table, click the parameter
that is bound to the swipe that you want to update.
In the Swipe Details area, select
Line from the first
list.
The line number
of the data appears. It is updated automatically based on the results
of the Find operation. Typically, the line number
is relative to the start of the file, but you can specify a line number
as an offset from the current location, a marker, or as a negative offset
from the end of the file.
Verify that the correct line is highlighted. If desired, change the
line number in the Line text box. You can also
enter an expression or click the expression button to open an expression editor. The matching item
in the text file is highlighted automatically.
Select how you want the data selected using the list at the bottom of
the Swipe Details area:
Option |
Description |
Whole Line |
Highlights the entire
line in the file that contains the information specified. |
Word # |
Highlights the specified
word number in the text file. The count is based on the number of words
from the left margin. |
Character |
Highlights the characters
in the specified range, which is specified in the corresponding text
boxes. |
Click OK to save your changes and to close the
Data Exchanger Component Editor.
|