If the Find Box is empty, command-G will take you to the next record. If you put text in the Find Box, command-G will take you to the first instance of that text in the datafile. command-G is equivalent to clicking the Forward Find Button (right-pointing triangle). If the Find Box is active, the Return key or Enter key will function similarly to command-G.
Find Next starts at the beginning of the current record and searches forward through the datafile. It searches both fields and Freeform Text Area. When it comes to the end the end of the datafile it will wrap to the beginning and continue searching. The search never stops, it will go around and around.
If the text you are searching for does not exist in the datafile, you will hear a System beep.
You can search through a datafile backwards, if you wish. The left-pointing triangle near the Find Box is the Reverse Find Button. The keyboard equivalent is command-shift-G. Reverse find will start at the end of the current record and search backwards through the datafile.
iData starts a new reverse search at
the end of the current record.
If the current record has many instances of the search text, and you know this is not the record you want, you can use the option key to continue the search at the beginning of the next record. Hold down the option key and click the Forward Find Button. Or, type command-option-G for a forward search.
If the current record has many instances of the search text, and you know this is not the record you want, you can use the shift and option keys to continue the search at the end of the previous record. Hold down the option key and click the Reverse Find Button. Or, type command-option-shift-G.
Normally, when text is found in the Freeform Text Area, it will be highlighted, but not active. The Find Box remains active. This is to avoid the common mistake of wiping out the found text with an accidental keystroke. It also keeps the Find Box active for another search.
If you want to highlight and activate the found text, hold the control key down when clicking the forward Find button. Or, type control-command-G. The found text will be highlighted and active so you can copy, cut, or type over it.
If you want to highlight and
activate the found text in a reverse search, hold the control key down when clicking the
Reverse Find Button. Or, type control-command-shift-G. The found text will be
highlighted and active so you can copy, cut, or type over it.
Although the iData Find Box and Find Button combination are great for quick searches, sometimes we need more advanced options. These are provided by the Find and Replace function.
There are two points that may not be obvious at first glance:
1. Only selected records will be affected by the Find and Replace operations. If you want to exclude certain records from these operations, you can use the various options under the Select menu to deselect those records.
2. The Find and Replace function works only with the frontmost datafile. Logically, this dialog should have been a sheet, attached to its datafile window. Unfortunately, it would then have covered part of the text area of the datafile, which could sometimes make it difficult to decide whether or not to replace found text. Although the name of the datafile in which operations will take place is shown in the Find and Replace window, it may not always update immediately when clicking around and switching between windows, so before replacing any text, please be sure that you are working with the datafile that you think you are working with.
To use the Find and Replace function:
1. With a datafile open, select Find and Replace... from the Find sub-menu, under the Edit menu, or type control-command-F. This will bring up the following window:
2. In the Search In: popup menu, select All Fields, a field name, or the Freeform Text Area.
3. Type or paste the text to be found into the Find What: text field. (Note that you can enter tabs and returns in this field, so you cannot use the tab key alone to move between this field and the Replace With: field. However, you can use control-tab to move between them.)
4. If you wish to replace that text with different text, enter the replacement text in the Replace With: text field. (Note that you can enter tabs and returns in this field, too.)
5. If you want your search to match uppercase and lowercase characters exactly as you enter them in the Find What: field, enable the Case Sensitive checkbox. If this checkbox is not enabled, uppercase and lowercase versions of a character will be treated as the same character. With this checkbox enabled, a search for bob will not find Bob, and vice versa.
6. If you want your find only whole words, enable the Whole
Word checkbox. With
this checkbox enabled, a search for pot will
not find potato.
7. If you want your
search (and any text replacement) to take place only in the
current record, enable the Limit
Find and Replace to Current Record checkbox.
8. Once all your settings have been made, click one of the buttons at the bottom of the Find and Replace window. Here is what will happen when each of these buttons is clicked:
a. Replace All -- All instances of the text in the Find What: field will be replaced by the text in the Replace With: field, subject to the constraints of the Case Sensitive and Whole Word settings. If there is no text in the Replace With: field, the text in the Find What: field will be deleted (replaced with nothing) wherever it is found.
b. Replace, then Find Next -- If the text in the Find What: field is currently selected in the datafile, it will be replaced by the text in the Replace With: field. Then iData will search for the next instance of the text in the Find What: field, and will select (highlight) it if it finds it.
c. Replace -- If the text in the Find What: field is currently selected in the datafile, it will be replaced by the text in the Replace With: field.
d. Find Next -- iData will search for the next instance of the text in the Find What: field, and will select (highlight) it if it finds it.
Multi-File Find...
The Multi-File Find function permits you to search through groups of datafiles--even datafiles that are not open.
When searching in unopened datafiles, iData will open them for searching, and will close them again if the target text is not found. Once a datafile has been opened to show found text, it will remain open until you close it.
To use the Multi-File Find function:
1. Select Multi-File Find... from the Find sub-menu under the Edit menu or type control-command-M. This will bring up the following window:
2. Type the text to search for (the target text ) in the Find What: text field.
3. Choose one of the Search: radio buttons. Here is what these buttons mean:
a. All Datafiles in the Datafiles Menu -- iData will begin searching with the first datafile in the Datafiles menu. It will go through the datafiles in that menu, and any sub-menus, until it either finds the target text or exhausts all possibilities. If it finds the target text, it will bring the datafile containing it forward and select that instance of the text. If you continue searching with this option selected, the search will take up from that point.
b. Only in Open Datafiles -- iData will search only in open datafiles. It will search in the order in which the various datafiles were opened. If you continue searching with this option selected, the search will take up from that point.
c. In Folder: -- If you select this option, you will then be able to select one of the sub-folders in the iData Pro Datafiles folder (which is represented by a sub-menu in the Datafiles menu).
4. If you want your search to match uppercase and lowercase characters exactly as you enter them in the Find What: field, enable the Case Sensitive checkbox. If this checkbox is not enabled, uppercase and lowercase versions of a character will be treated as the same character. With this checkbox enabled, a search for bob will not find Bob, and vice versa.
5. If you want your search to find only whole words, enable the Whole Word checkbox. With this checkbox enabled, a search for pot will not find potato.
6. If you are searching through
lots of large datafiles, you should probably enable the Stop
search at the end of each datafile checkbox, to give you a chance
to abort the search without waiting for all of
the datafiles to be searched. This is a particularly good idea
if you are searching for some text that has a low chance of
occurring in any datafile.
7. Once all your settings have been made, click the Find Next button. If the target text is found, but you want to continue the search, just click the Find Next button again, and the search will continue from where it left off.
8. As each datafile is opened, the datafile
name will be displayed in the Searching in: text
field.
9. If the target text is found, the datafile containing it will be brought up and the text will be selected (highlighted). However, the Multi-File Find window will continue to be the frontmost window. If the Multi-File Find window is completely obscured by the datafile window, just type command-option M to bring it forward again.
10. When all datafiles have been search, the Searching
in: text field will show <<Search
Completed>>. At that point, you can click the Find
Next button to restart the search from the beginning, if
you wish.
11. Whenever the search is halted, you can change the Find
What: text, the Search: selection, the Case
Sensitive checkbox, the Whole Word checkbox,
and/or the Stop search at the end of each datafile
checkbox. Changing any of these settings will cause the search
to begin again with the first eligible datafile.
If there is some text in a record that you want to use to search other records, simply highlight that text and select Copy Selection to Find Box in the Find sub-menu, under the Edit menu, or type command-F. This will put a copy of the text in the Find Box without using the clipboard.
This item is only used with Classic
iData-style searching. If you want to find a record that has
both Smith and Texas in a
datafile with lots of Smiths and lots of Texas addresses, you
can search on "Smith&&Texas". Multiple search elements
are separated by &&.To insert that && at the
current text entry point in the Find Box, you can select the
menu command Edit: Find: Insert && in Find
Box (or type command-&),
click the &
toolbar button, or just type &&. There is no limit to
how many && can be used. So, you could search for
something like Smith&&Texas&&bluegrass&&fiddle&&jalapeño
chili.
NOTE: You should not include spaces on
either side of the &&, unless you want those spaces to
be included in the search.