Words and numbers form the bulk of most databases. All these letters and figures convey important information, but they can be pretty boring. Increasingly, people are using FileMaker databases to store images, movies, and other bits of multimedia. For example, you can store a photograph of each employee right along with her personnel records. Or add product shots to your inventory database.
The Contact Management database has one field you may have been ignoring until now: Image. Unlike all the other fields in this database, the Image field doesn't expect (and won't accept) typed text. It's a special kind of field called a container field. Container fields can hold just about anything you want, including pictures, sounds, animation, music, and movies. You can even put any file from your hard drive into a container field, like a PDF file or a Word document. You can see container fields holding assorted things in Figure 2-21.
Whether you realize it or not, when you use container fields you're using FileMaker as asset management software. That's the industry term for elaborate, customized software that contains and catalogs huge numbers of images (for use in brochures, books, or Web sites, for example). These programs are essentially databases, and with FileMaker, you can also manage large numbers of the images and documents you use every day. The data in a container field falls into one of four categories: picture, QuickTime, sound, and file.
A picture can be in any of more than a dozen formats, including the common kinds like JPEG, GIF, and TIFF, PICT, and BMP. FileMaker will also accept PhotoShop and PostScript (.eps) files. When you put a picture in a container field, the field displays the picture itself.
The following methods for copying, pasting, and inserting pictures into container fields are the same whether you're inserting a movie, PDF, text, or other type of file. You see the same type of Insert dialog box for navigating your hard drive each time.
2.7.2. Copy and paste
The most obvious way to put a picture into a contained field is to paste it in. You can copy a picture from just about anywhere, then click once in the field and choose Edit Paste (Ctrl+V or -V).
You can also copy data from the container field. Again, simply click once on the field, and choose Edit Copy (Ctrl+C or -C) or Edit Cut (Ctrl+X or -X). Whatever was in the field is now ready to paste into another field, record, or program.
22.214.171.124. Insert images/U2192.jpg border=0> Picture
If the picture you want in a container field is stored in a file, copy and paste doesn't do you much good. You'd have to open the file in some program first, and then copy it from thereand that's no fun. Instead, you can insert the file directly into the field without ever leaving the comfort of FileMaker. Here's how:
You've now entered the record, and the Image field in particular.
FileMaker grabs the picture and puts it in the Image field.
Tip: If you need to insert lots of pictures into a database, you can save yourself a lot of trouble by using the File Import Records images/U2192.jpg border=0> Folder command. See Section 17.4.2 for the full explanation.
POWER USERS' CLINIC
Store a Reference
When inserting a picture, QuickTime movie, or file (Section 126.96.36.199), the dialog box includes an option to "Store only a reference to the file." When this option is turned off, FileMaker copies the actual file into your database. You can move or delete the original file and the data will still appear in the field, because the database now contains all the file's information within itself. If you turn on "Store only a reference to the file," FileMaker doesn't copy the file into the field at all. Instead, it just remembers the file you wanted. Each time you look at this record, FileMaker returns to the disk and finds the original file so it can display the data. In this respect, it works exactly like a shortcut or alias. If the file is gone (moved, deleted, or renamed), FileMaker will show you this message instead.
There's no simple rule for when you should store the actual file, and when you should store a reference instead. Most people decide to store the file itself, because it saves the trouble of keeping the files and database together.
This is expecially true when multiple people are using the database from different computers. On the other hand, here are a couple of reasons you might want to store a reference instead:
Otherwise, when you're using your database day to day, it usually doesn't matter whether you've inserted a reference or the actual file. For the most part, both kinds work exactly the same. This book explains the differences as they come up.
Just as with a picture (Section 188.8.131.52), you can copy and paste QuickTime movies or sounds into the container field or use the Insert images/U2192.jpg border=0> QuickTime menu command to select a QuickTime file from the hard drive.
Note: FileMaker lets you copy and paste either entire QuickTime files or sections of footage or sound that you've selected before copying. To do so, just open the file in QuickTime Player for Mac or Windows and use the movie controls to select the desired snippet.
A sound is a recorded bit of audio. FileMaker actually lets you record sounds right into the field. You can keep audio notes with a project record, or record your practice speeches and save them for when you're famous. When a container field holds a sound, it displays a little speaker icon; double-click it to hear the recorded sound.
184.108.40.206. Recording sound
The Insert Sound command doesnt bring up the same dialog box as the other Insert commands. Instead, it shows the Record dialog box (Figure 2-22). If your computer has a microphone attached, you can record any sound directly into the field.
The Record dialog box is simple, but capable. The speaker icon provides feedback about what the microphone's picking up, by showing little soundwaves indicating the sounds it's hearing. The more soundwaves you see, the louder the recording. In fact, the speaker icon lets you check for soundwaves even when you're not recording, so use it to do a quick sound check ("Testing, testing, 1, 2, 3"). If you don't see waves when you talk, make sure the microphone's plugged in.
When you're ready to record, proceed as follows:
FileMaker immediately begins recording everything the microphone hears. As it does, the Recording Time progress bar fills slowly. When the progress bar reaches the end, you've recorded as much as you have room for.
At this point, you have some sound recorded. The length of the recording shows to the right of the Recording Time progress bar.
Once the recording is playing, you can use the Stop or Pause button to stop it. Clicking Stop will stop it completely. (The next time you press Play, it starts over from the beginning.) Pause, on the other hand, lets you stop the playback momentarily. (Clicking Pause or Play again starts the playback right where it left off.)
If you click Cancel, FileMaker completely erases the sound you recorded with no warning…so be sure you click the correct button.
Tip: The Insert Sound command is specifically for recording sound directly into the field. If you have a sound file of some kind already on your hard drive (an MP3 for example), choose Insert images/U2192.jpg border=0> QuickTime instead. In general, if the data youre putting in the field has a time component (meaning it happens over time, like video or sound), treat it like a QuickTime file.
A container field can also hold a file. Since FileMaker doesn't know what the file is supposed to be, it simply shows you the file's name and icon. Unfortunately, you can't do anything with a file like this while it's in FileMaker. You can't edit it. You can't even open it and view its contents. Rather, the Container field simply holds the file for you. (Soon you'll learn how to get it back out.)
|GEM IN THE ROUGH
PDFs in Mac OS X
The ability to store pictures, movies, sounds, and files in your database can be useful for lots of reasons. For example, if you're a recruiter, you could store resumes in Microsoft Word or PDF format right in the database alongside the info about a particular candidate. In fact, the Adobe PDF format is so common that people often need to keep track of PDF filesthe brochure, flyer, or documentation for each of your products, the prospectus for each of your investments, or a floor plan for each of your properties.
You already know you can use the Insert File command to store the PDF document right in a container field (and get it back out again later to look at it). But if youre on Mac OS X, you can do one better. Choose Insert Image and then select a PDF file. FileMaker then shows you the PDF (the first page of it, anyway), right in the container field. If your document has more than one page, you need to export the PDF out of the container field (Section 2.8) to read the whole thing.
QuickTime instead (Section 220.127.116.11).
If you need to search within a PDF file, try this. Open the PDF file, select all the text, copy it, then paste it in a regular text field. FileMaker can search the text field, but you can view the PDF in all its glory in the container field.
If you can't use the file in FileMaker, why put it there at all? Sometimes people need to keep track of lots of files. They might need to organize them in ways that make sense only to their business. Keeping all these files in a folder on your hard drive can be a real drag since they can be slow to search and hard to reorganize. With FileMaker, you can keep the files right alongside other important data. For example, you can store project specifications (in Microsoft Word format) and diagrams (in Visio format) in your database along with tasks, team members, and timelines.
|POWER USERS' CLINIC
Getting the Most Out of Your Fields
The Edit Export Field Contents command isnt limited to container fields. With very few exceptions, you can export the contents of any field to a file. By contrast, you can't export a sound you recorded in FileMaker and you can't export the contents of a field you can't click into. (To help understand why you can't click in some fields, read about field behavior in Chapter 6, and security in Chapter 16.)
Here are some examples of how to export to your advantage:
Let FileMaker really impress you by clicking both options at once. You'll get a copy of the file open for reference and a fresh, shiny email nearly ready for sending. If you've got the screen real estate, you can look at both these little jewels while you're checking out the FileMaker record that spawned them.
The most common way to place a file into a container field is to use the Insert File command. On Windows, you can also copy a file on the desktop and paste it into a container field. When you insert a file, FileMaker makes no effort to figure out whats in the file. If you choose a picture, you'll still get just the name and icon. If you want to see the picture itself in FileMaker, you must choose Insert images/U2192.jpg border=0> Picture, as described on Section 18.104.22.168.
22.214.171.124. Exporting data from container fields
Inserting files into container fields is all well and good…but it's just as important to get them back out again. When you use the Insert File command, all you get to see is an icon and file name. Copying the file from the field with Edit images/U2192.jpg border=0> Copy, doesnt even do you much good, since FileMaker can't paste files to the desktop where you might actually be able to open and read them. A better way is to use the Export Field Contents command. Just click in the container field in question, and choose Edit Export Field Contents. FileMaker asks you where you want to put the file, and what to name it. Click Save, and FileMaker creates a new file thats an exact copy of the one you put in the container field.
Part I: Introduction to FileMaker Pro
Your First Database
Organizing and Editing Records
Building a New Database
Part II: Layout Basics
Advanced Layouts and Reports
Part III: Multiple Tables and Relationships
Multiple Tables and Relationships
Advanced Relationship Techniques
Part IV: Calculations
Introduction to Calculations
Calculations and Data Types
Part V: Scripting
Part VI: Security and Integration
Exporting and Importing
Sharing Your Database
Part VII: Appendixes
Appendix A. Getting Help