Beyond Text: Container Fields
Beyond Text Container Fields
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.
2.7.1. Pictures
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
You can also copy data from the container field. Again, simply click once on the field, and choose Edit
2.7.2.1. Insert
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:
- Click in the Image field.
You've now entered the record, and the Image field in particular.
- Choose Insert
Picture. Click Open.
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
POWER USERS' CLINIC
Store a Reference
When inserting a picture, QuickTime movie, or file (Section 2.7.2.1), 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:
- Storing many larger files can make your database get bigreally bigwhich can cause a number of problems. It's harder to back up and move a huge database file from one place to another. If you're trying to email the database to your home office, your ISP may not appreciate (or allow) a 3 GB attachment, for example. If the inserted files aren't critical to the record data, it may make sense to leave them out of the database so it's easier to work with.
- Sometimes you want to catalog files inside FileMaker even though they might change over time. For example, if you wanted to put promotional images into a database so they're easy to locate, you probably don't want to make editing those images difficult. If you store a reference to these images, you can still edit the originals any time. As long as you haven't changed their name or location, when you look in FileMaker, you'll see the latest edits.
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 2.7.2.1), you can copy and paste QuickTime movies or sounds into the container field or use the Insert
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.
2.7.4. Sound
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.
2.7.4.1. Recording sound
The Insert
|
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:
- Click the Record button.
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.
- When you're done recording, click Stop.
At this point, you have some sound recorded. The length of the recording shows to the right of the Recording Time progress bar.
- To hear what you got, click Play.
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're satisfied with what was recorded, click Save to store the sound in the container field.
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
2.7.5. 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 QuickTime instead (Section 2.7.2.1). 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 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
2.7.5.1. 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