Join Cris Ippolite for an in-depth discussion in this video Constraining or extending found sets, part of FileMaker Pro 11 Essential Training.
- View Offline
There are sometimes when you're searching for data within FileMaker Pro that you might want to start with a larger found set and then drill down within that found set, or expand that found set based on additional criteria. This type of technique is very useful if you're administering a database and you are troubleshooting, or you are just trying to clean up or maintain the data integrity. In these cases, you can use functions that are called Constraining and Extending found sets. For example, I will go into Find mode here, and I am going to do a search for California in State. You see that we've got 23 records in this case, all these people in California, but how many of them have the status of inactive? Now keep in mind it's of course less dramatic when we are dealing with record sets of 23, but imagine if you had 23,000 records in this case, how difficult it would be to visually see this information.
So now in this case, I am going to go into Status, and remember now that I have already done a find. I just did a search for all the State of California records, and what you may not be aware of is that FileMaker is remembering what the last find was that you've just done. So, right now, as I'm putting in my next find request, FileMaker knew what the last one was. So now if I put Inactive in the Status field and if I go under the Requests menu, you'll notice that I've got some additional options below Perform Find, which is what we've been doing in all of our movies thusfar.
If I choose Constrain Found Set, let's see what happens. You see I have got four records in my Found Set. I put Inactive in there, but if I go back into Find mode, you'll see I will get more than four records; I get 147 records if I search for it this way. But what constrain does is it instructs FileMaker to say, within the Found Set we just did, I want to further constrain those records based on the criteria that I'm entering inside the field or fields within the find request. So you can do it the other way, as well. So, for example, if I say find California, Perform Find, enter Find mode again, and this time inside the Status, I am going to enter pending, but now, I am going to choose Extend Found Sets.
So if you remember before what we did under Constrain is that we took the original Found Set and then said within that Found Set, find everything with the status of Inactive. Now we are going to say take my original Found Set of 23 records with the State of California, and I want you to extend it, so to add into that Found Set any record that matches his criteria. So in this case we are going to have all the California and all the status pending. So now let's say Extend Found Set, and now you see we have 1,226 records, which make up our California records, as you see here, that doesn't have a status of pending, but also all of the other records that are not California that do have a status of pending.
So these are ways that you can increase the size of your original Found Set or decrease the size of your original Found Set. The real power of this, of course, comes in when you have thousands of different records, and you can't see the results immediately onscreen. This will allow you to be able to drill up and drill down from certain criteria, because keep in mind, you can keep constraining and constraining and constraining and constraining because whatever your last Found Set is it's going to reflect the last constrain you did. So it's conceivable that if you are trying to drill into some data and prove a theory or look for trends in raw data, that you can just keep modifying your Found Set until you finally get a small subset that's just the perfect amount of information that you are looking for.
Working with varying groups of records is always powerful, and you can easily view trends in your data, search for expectations or problems in the information that you have entered, or even import it into your solution, or quickly access specific records, all using either Constrain or Extending Found Sets.
- Creating databases from templates
- Creating fields in spreadsheet format
- Creating tables and relationships
- Defining key fields
- Adding validation and auto-enter values to fields
- Managing records, including duplicating, locking, and deleting records
- Creating and managing layouts
- Formatting layout objects
- Finding and sorting data
- Creating calculation fields
- Building reports
- Printing and saving as PDF or Excel
- Writing and triggering scripts
- Using relationships throughout a database