Summaries and Design / Improving the Database: Joins for Searching
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
I am returning to the basic layout that here I have used for data entry to create invoices. And I am going to make just a few more tweaks and changes to it, and show you how I can use joints in the database to do searches. I have added the ability to enter a date for an individual invoice and to modify, because I have been using the current days date auto entered as the invoice date. Now I want to be able to modify that date so that I can demonstrate some searching for you. Here I have an invoice that I have entered and I have used a date in 2003.Lets say I want to search for invoices. I can click on search and I will go to another layout and I have two fields here ,let's say I want to search for invoices between january-1 -2003 and in december-31st -2003, entire year 2003. When I click out I have one invoice there. Here is the date 4/17/2003 ,and here is the invoice number its underlined and its a convention that many people follow from the web its underlined so its hot ,I can click on it and open invoice 17 in its own window. Notice that I am opening a second window on to the same database table. Now if I want to look at the following years data January-1 -2004 to December-31st 2004, I will click out of there I have three invoices all dated within 2004. If I want to look for invoices dated after 4 -17 I can say. So I want invoices from 4- 18 to December 31st, click out this only one again, I can click on it and open it in its own window. I am not doing any fines here .What I am doing is I am using a self join in the database. I have created it alias here to the invoices table and I call it invoice searcher. And what it is is I use the global fields that I have created previously in the invoices table Gsearch start and Gsearch end. And I have created the relationship here between invoices and the same table now known as invoice searcher. And the criteria for the relationship is that the Gsearch start the global start is less than or equal to the date on the invoice and the global for search and is greater than or equal to the date on the invoice. It's a complex relationship it's not an equi join its two separate relations that are like a query to a database. So what I do is these are the global fields up here I specify what ever dates that I want in these fields. Instead of executing a find what I am doing is that relationship determines the record that will be shown in this portal. This portal if I go into layout mode, you will see is based on the invoice searcher table which is the self join table that is related to invoices which is the base of this layout. If I go to layout setup you will see that what I am working basically with the invoices table in this layout. I can tell you I frequently it is useful to use this type of join, it can a self join or it can be a join from another table to find, to select data with in a table. Once you set it up you set up your relationships and there could be many many of them. I could set up other relationships here, this happens to search by date, I could search by customer name or whatever I can have a variety of these little alias tables down here that are copies of the invoices table, each one of which is related in one way or another to global fields in invoices . I just type data in those global fields and automatically select what I want.
Tutorial Information
| Course: | FileMaker Pro 7 |
| Author: | Jesse Feiler |
| SKU: | 33495 |
| ISBN: | 1-932072-88-8 |
| Release Date: | 2004-05-28 |
| Duration: | 8 hrs / 137 lessons |
| Captions: | For Online University members only |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 