- Getting Started
- Understanding FileMaker Pro Features
- Using the Status Toolbar
- Working in FileMaker Pro
- Working with Records
- Working with Fields
- Working with Related Data
- Finding Data with FileMaker
- Importing and Exporting Data
- Using the Web Viewer
- FileMaker Extra: Becoming a FileMaker Pro Power User
Finding Data with FileMaker
Up to this point, we’ve discussed working with a single record and the fields on a given form layout, but at all times FileMaker holds a found set of records—anywhere from none to all the records in the table that is the basis of the current layout.
This is an important point to remember: Even though you might be able to see the contents of only one record’s fields (more than likely in Form view), you can still work with either all the records in your table or a subset of such. Think of it as working with a deck of cards. There are 52 total cards in your deck, some of which are in your hand, and one of which is frontmost (visible). Your current record would be akin to that front card and your found set like those cards in your hand. In FileMaker, many functions apply to a found set. A good example is sorting: You are ordering only those records in your found set.
Many FileMaker Pro databases offer layouts tailored to be viewed either in Form view, where one record encompasses the information on the screen, or in List view, where layouts display multiple records at once. The figures in this chapter have shown both styles. Today, with the knowledge that FileMaker databases may be used on a wide variety of devices, many people are adhering rather strictly to this list/form structure. It is a familiar interface paradigm on the Web, and it is easily adaptable to desktop and mobile devices.
Figure 2.27 shows the Assets Starter Solution in Form view on an iPad running FileMaker Go; Figure 2.28 shows the corresponding List view.
Figure 2.27. Assets Starter Solution in Form view on an iPad running FileMaker Go.
Figure 2.28. Assets Starter Solution in List view on an iPad running FileMaker Go.
Working with groups of records is important mainly for comprehension and processing of your information. Data entry occurs on one individual record at a time, unless you’re importing or performing some other function that applies across multiple records. It’s in the reporting and analyzing stage that working with multiple records becomes necessary.
One of the first ways to work with a group of records is simply to scan the list visually. Summary fields might lie at the bottom of a List view and can total numeric data based on a current found set, or perform other summary operations such as counting or averaging.
For a quick example of how this might work, imagine a sales database. If you were to find or search for all records in January, your summary fields could total January’s sales. If you were to find again for the year 2013, your totals would be annual. The value of the summary field varies depending on your found set. If you perform different find requests, the information on your screen can deliver different results, specific to a given group of records.
One last important note about found sets: They can be composed of records from only one table. You cannot, for example, display records from an automobile table and a manufacturer table in the same List view or Table view, although they can be shown as related fields to the main table’s records.
Using Quick Find
At the right of the Status toolbar in Browse mode, a search field lets you perform a Quick Find. Type the word or phrase you’re searching for, and FileMaker searches for it in the current layout’s table. FileMaker doesn’t care what field the data is in: it will find “York” equally well in a field for city name, a field for last name, and a field for plays in Cricket. You type it, FileMaker Finds it.
Using Find Mode to Perform a Find Request
You can also use Find mode to search for data in specific fields. This lets you work with found sets of records.
To create or change your found set in FileMaker, you must perform a find request or search. This entails getting into Find mode and entering some set of search criteria into the field (or fields) by which you want to search. FileMaker takes you back into Browse mode after your search is complete.
To perform find requests in FileMaker, you have to use one of three options to change to Find mode: the Find icon at the right of the Status toolbar, the menu on the bottom left of your application window, or the View menu. Developers might also opt to put various Find buttons into their systems. When you have entered Find mode in any of these ways, the Status toolbar changes, as shown in Figure 2.29.
Figure 2.29. The Status toolbar changes when you click the Find icon.
At the left of the Status toolbar, the Records section that is visible in Browse mode changes to a Find Requests section. Instead of paging through records, you can now page through find requests. Similarly, instead of seeing the number of records, you now see the number of find requests.
To the right, icons let you create new find requests and delete old ones; others let you perform a find or cancel it to return to Browse mode. At the bottom right of the Status toolbar, buttons let you indicate that a find request should return records that match the request or that it should omit records that match the request. Logical operators for the find requests are also available. All of these are described in this section.
After you’re in Find mode, you create a find request that describes the criteria by which you want to search. You enter data into fields just as you would in Browse mode, but instead of creating or modifying records, these requests serve as instructions for finding your data. You can add a new request, create multiple requests, and delete requests from the Status toolbar or from the Requests menu that replaces the Records menu in Find mode.
FileMaker Pro shows a small magnifying glass in data-entry fields when in Find mode, as you see in Figure 2.29. As soon as you click in the field, the magnifying glass disappears and you can type your find criterion. This prevents users from accidentally entering data in Browse mode when they think they are in Find mode. For example, you can type iMac into the Item field. Figure 2.30 shows the results of the find. Notice that you can tell from the Status toolbar that you’re automatically back in Browse mode. At the left of the Status toolbar, you can see that one out of seven records has been found (that is the found set).
Figure 2.30. FileMaker matches the find criterion “iMac” in the Item field against the data in the database after you click Find to find all assets with “iMac” in the field item.
If you perform another find, the records matching your new request replace your found set.
You can perform a complex find by entering data into more than one field. FileMaker Pro finds all the records with both of those find criteria. In database parlance, this is called an and query. Figure 2.31 shows a request with two criteria: MacBook is entered in the Item Name field, and oscar is entered in the Assigned To field in the portal. Both of these conditions must be fulfilled for a record to be found.
Figure 2.31. A find request with multiple fields specified retrieves data in which all the criteria are met—an and query.
In addition to text that you type in, you can use operators to construct queries. Figure 2.32 shows the Operators menu in Find mode.
Figure 2.32. Special symbols enable you to search for a wide range of match criteria.
The less than, less than or equal, greater than, greater than or equal, and exact match symbols should be obvious. An entry of >3 finds all records with a value 4 and above. An entry of <=100 finds all records with a value of 100 or lower (including zero and negative numbers).
The ellipsis (...) for ranges is a commonly used search symbol. The search criterion 1/1/2003...12/31/2006 returns all records for the span of four years. (Two or three periods from your keyboard work just as well.)
Use * and # for wildcards. The # symbol is for one digit exactly. An entry of 5# finds all whole numbers from 50 to 59. The # alone finds just numbers 1–9. A 1#1 criterion finds 101, 121, 131, and so on, but not 211 or 1211.
The ~ for relaxed search looks intriguing, doesn’t it? Some fuzzy logic, perhaps? No such luck. It’s used to search for common base characters in two-byte Asian phonetic alphabets. It doesn’t do anything for any other languages.
Shortcuts for Fast Finding
The right-click (Control-click for Macs using a one-button mouse) contextual menu for a field in FileMaker will show three “fast match” commands: Find Matching Records, Constrain Found Set, and Extend Found Set. Here, FileMaker performs a find request on the data in the field in question. If, say, you right-click a field containing the term porch and choose Find Matching Records, your found set changes to show all porch records. Likewise, you can constrain and extend your found set based on the value in the field. We’ll cover these concepts in the next section.
FileMaker also has some date-searching capabilities that save time. You can type 2005 in a date field and FileMaker correctly interprets that to be a */*/2005 search that results in all the records for a given year. Likewise, you can enter 1 through 12 in a date field and FileMaker assumes that you’re searching for records within that month for a given year.
Finally, you can search for the names of the days in a date or timestamp to pull up records specific to the days of the week.
Multiple Find Requests
FileMaker Pro also enables you to perform complex searches involving multiple find requests. To find both the MacBook and the Oscar records, a user would simply enter Find mode, type MacBook into the item field, and then create a new record/request. Just as you can create new records in Browse mode, you can create and delete requests in Find mode. This process is identical to creating a new record in Browse mode. In the second record, a user would enter Oscar in the assigned to field.
A user can flip between requests, using the book icon in the Status toolbar, and can delete requests as necessary. As soon as the user is satisfied with a series of requests, clicking Find on the left performs the find and returns the user to Browse mode with a new found set.
Multiple find requests can also include requests meant to be omitted. Use the Include and Omit buttons in the Matching Records section of the Status toolbar to do this. Thus, you could find all painting tasks for the house—or by omitting house from painting tasks, you could find those that refer to the garage, garden shed, and other non-house areas. Whereas typing find criteria into multiple fields in a single request produces an and query (all the criteria must be true), using multiple requests creates an or query—all the criteria in the first request must be true or the criteria in the second request must be true, and so forth.
Figure 2.31 shows a typical and find request: It searches for records that contain an item named “MacBook” and an assigned-to named “Oscar.” If you create two separate requests, one of which searches for the item and the other of which searches for the Assigned To name, you will have an or request. Because they are separate requests, they find all records where the item name contains MacBook or the Assigned To name contains Jack. In general, or queries return as much or more data than and queries because they are less restrictive.
Constrain and Extend Requests
Performing find requests is all well and good, and as you can imagine, they can become quite complex. Instead of developing complex find requests, you can work through the complexity in stages. Rather than clicking the Find button in the Status toolbar, choose Requests, Constrain Found Set. FileMaker Pro performs this new find request on only the existing found set rather than on the entire database.
Using Requests, Extend Found Set works in a similar fashion by retaining the existing records and simply adding more to them. This way of working helps you simplify complex queries. It also is a powerful way for you to explore and analyze the data in your database.
Modify Last Find
Modify Last Find is a great feature for find requests. In Browse mode, choose Records, Modify Last Find. You are placed in Find mode with the last set of find requests you performed. This capability is handy if you want to continue to play with a particularly complex set of find requests or are simply performing a series of similar requests.
Finding on Multiple Layouts
FileMaker’s find functionality is flexible. While you are in Find mode, it is entirely possible to change layouts. As long as all the layouts on which you enter your requests are associated with the same source table, your find performs just as though you had a layout with all the fields on it you needed. Finding is not layout specific.
Finding is, however, always table specific. Some more advanced FileMaker Pro solutions comprise multiple tables. Although it is possible to search across related information in FileMaker Pro, your find results will always display a found set of records from a single table.
- To learn more about working with multiple tables, see Chapter 6, “Working with Multiple Tables.”
Omitting and Showing All Records
After performing a find, you can opt to omit individual records from the resultant found set. Choose Records, Omit Record to omit a single record or Omit Multiple to omit a specified number of records. To restore your found set to the full set of records in your current table, choose Records, Show All Records.
With the Status toolbar, use the button shown in Figure 2.33 to switch between the found and omitted records. Choosing whether to find or omit records while you are constructing find requests in Find mode is done with the Matching Records choice; after you have performed the find, use this icon in Browse mode to switch between the found and omitted records. For example, you can find all records assigned to Oscar and omit those that have not been checked out (in other words, they might have been assigned to Oscar but he has returned them).
Figure 2.33. Switch between found and omitted records.
Saving Find Requests
You can save find requests for future use. This is particularly helpful with complex find requests. The Save Finds icon at the right of the Status toolbar brings up the menu shown in Figure 2.34.
Figure 2.34. You can save finds in FileMaker Pro.
If you choose to save a find, you are prompted to name it, as shown in Figure 2.35.
Figure 2.35. Save finds by name.
The Advanced button in the lower left lets you open the details of the saved find. At first, all you see is the find command you have just performed, as shown in Figure 2.36.
Figure 2.36. See the find you have just performed.
You can edit the find command, as shown in Figure 2.37, to customize it before you save it.
Figure 2.37. You can modify the find before you save it.