Join Cris Ippolite for an in-depth discussion in this video Using container fields in your database, part of FileMaker Pro 14 Essential Training.
- Container fields are an important building block for any FileMaker Pro solution in which you want to store and or display more than just texts, numbers, dates, and times. With container fields, your database solution can store any binary sort of data. That's really just a generic term for any data that cannot meaningfully be represented as text. And you're already familiar with this type of file, for example, music files or audio files, or even electronic documents much like PDFs, spreadsheets, Word processing documents and the like.
Really any kind of non-data file can be stored inside a container field. Specifically, container fields can hold up to four gigabytes of this binary data. And they can actually play back some of the media as long as the media can be played back in QuickTime version 7.5 or higher. That's sort of the way that you can tell whether or not FileMaker is gonna be able to play it back. So let's go into our exercise file and go to the customer's layout. And we're gonna drop the container field on this layout so that we can see kinda how this works.
So first we'll go into Layout Mode and move our Field Picker over just a little. Let's widen out the layout just a tad. And we actually already have the container field here. The container field and the customers table is the one that's called Company Logo. We can see that here, Company Logo type container. You can also see that a container field is a little bit different looking. You notice these text fields have these baseline below them, the little dotted line. You'll notice when I broaden out the Company Logo field that it doesn't have those baselines.
So you can see just by looking at it what's a container field and what's not. We can put the label up here if we want but sometimes you don't need label fields for containers anyways. So the idea behind making a container field larger is just based on what kind of media will be stored inside of it. So if you want the image to be large, you can have it here. You can constrain it and it will show up as a thumbnail if need be. But in this case I wanna make it large enough for you to be able to see the different things that we can put in here. So let's go into Browse Mode and save our changes. And so the question is how do we get these files inside of a container field.
Well, you'll notice that we have a Insert option up above and everything's grey. And that's because we have to first establish the context of the field that we want to insert into. So I'll click inside the container field and you can tell that I've clicked inside that field because it's got the highlight around it. And now when I go into Insert, you'll see that I can choose insert from a file for example. And let's go ahead and just put a image file in there. So I'm gonna choose this image file from our exercise folders and hit Insert. You'll notice that it just shows up as an icon instead of the actual image.
And that's because we specifically chose to insert a file not a picture. So I just wanna make sure that you're making kind of a decision when you're choosing which way to insert. So we can click inside the field, hit Delete. I just hit my Delete key. And now if I do Insert Picture, you'll see that it pulls in an actual image. So you can incorporate images into your database and to each individual record. And you'll notice that it's specific just to that record it's on, just like any other data that you put in into a field. So really, this starts making FileMaker a really important asset management tool because you can have this multiuser environment where users can add images to database records and add metadata to them.
In that way you can use FileMaker's built-in searching features to be able to search for all this media. It's a lot easier than just having it in files and folders in volumes that people are sharing. So it's definitely a way to think about storing some of your information. The other thing that's interesting about it is that I can get the data out of the container as well. So for example, if I right click in here, you'll notice that I've got this option called Export Field Contents. If I choose that option, you'll see that I can save that image anywhere I'd like, let's say on the desktop.
I also wanna show you on the bottom of the screen here, notice that I've got a couple of options for automatically opening the file. And what's interesting about that is if you want users to be able to open up the file that's stored there in its native application. So for example, if you have a PDF file in there and you wanna have it open up in preview or reader or something, you can check this option and it will automatically open up. The same thing is true if you want to email the contents there. So the other way is you can just hit Delete and get that information out of the field. I should show you something else too.
And this is pretty compelling stuff. I'm gonna open up the window a little bit and reveal the folder here of the exercise files. The reason I'm doing this is because I wanna show you the drag and drop support for container fields. So here I have a image in my finder. I can drag it right to the container. And it automatically adds it. The same is true for some of these other types of files. Here I have a PDF file and I've dragged that to the container. And you see that it recognized the PDF as a picture. So it actually shows me an image of the front page.
So I can emulate that same thing under the Insert dialog by saying Insert Picture and choosing the proper file, so let's say the PDF right there. Now, alternatively, if I don't wanna show the preview and I just treat it as a file, I can say Insert File. And it'll just show up as the icon with the name in there. So the other thing that's interesting is that you can also put in media like movie clips or audio files. So if I drag this movie into it, you see I can store it there.
But let's do a couple of quick changes to make this even more compelling and interactive. I'm gonna go into Layout Mode and I'm gonna select the container fields. And now I'm going to make some room for my Inspector. Now what I wanna show over on the data tab of the Inspector all the way in the bottom. Let's go ahead and collapse some of these to bring that to the top. You'll notice that we have some options here for containers. You'll see here that it recognizes the container because it gives us that graphic icon. And we've got some formatting options in the drop down to either reduce the image that we drop inside of it to fit.
So if it's a much larger image, it will constrain it to the proportions of the field on the layout. It will enlarge it that way or reduce and enlarge. We can also manage the alignment. But here's the part that I wanted to show you as interactive content. So I can change the setting for just this field on this layout. It doesn't change it for this container field on all the other layouts in our system. But you'll notice that when I go into Browse Mode, now we have a little bit different experience here. When I click inside of it for starters and drag that movie in, you'll notice that we actually get the movie.
And we can preview the movie as well. So we can play the movie. And we can see that the user can actually see what the contents are. It's the same thing with an audio file. It will actually play the sound for you. What's even more compelling about this is that what we do when we actually put in a PDF. So here, because we've changed it to interactive, I can't just hit the Delete key, so instead I'm gonna have to hit the Cut key there. But now when I right click, you'll see that I have other options available to me, not just insert picture and file but now audio video, which we just did, or also insert from PDF.
And let's look at that. So I insert the PDF. And it shows us what looks like a preview, but what's actually happening now is we can interact with the PDF just as we would inside any of our reader applications. And you'll notice that if you have a PDF reader installed in your browser, the container field is going to show that. It's because essentially, FileMaker's piggy backing on the PDF reader that you have installed as a plug-in in your browser. So this is a great way to allow users to actually interact with PDFs and whatever plug-ins you have installed.
That same functionality like here, I can zoom in or I can download it. Those are all going to be available to you, or open this PDF and preview for example. All that functionality will be available to you. This is a great way to include readable documents inside your layouts. You can make this container as large as you want so that users can actually interact with the content. And they still have the ability to do things, for example, like export the field contents, save it somewhere else on your system. And still the things like dragging and dropping are supported here as well.
So if I go in and I hit Cut and I say help center for example. Drop that in. You see we're still zoomed in. I could zoom out a little. But you get the general idea that interactive content helps with not only PDFs but also with movies and image files. You should be aware that when you turn on the Interactive Content option inside Layout Mode that you're actually limiting the size of the media that you can put inside this field. If you don't have Interactive Content on, you can store up to four gigabytes worth of a file size into a single container field.
If you turn Interactive Content on, you're now limiting it to just one gigabyte of content because there's sort of different engines at work there. The other thing you should be aware of is that you can only put one file in a time into each container. If you need to add more than one file per record, you have a couple of options there. You can either create a container field for each file you wanna store. So for example, let's say, you wanna store a signature page in one container and then a whole another image for the original contract and then one for the customer's logo, that kind of thing, just create multiple containers. You can create as many container fields as you want.
But if you must store multiple files into one single container then you can zip those packages up for example. So they become one file and then you can insert those into a container. And FileMaker's container fields are really special types of fields that allow you to store media and files within your database records. FileMaker's provided many different options for storing those files to allow you to interact with them if you'd like to. Or you can have your files that are stored inside containers behave much like they would if you were viewing them in a web browser for example.
- Comparing flat vs. relational databases
- Creating databases from starter solutions
- Determining what tables you need
- Understanding relationship types
- Defining key fields and creating relationships between tables
- Creating and working with fields, including container fields
- Creating, duplicating, editing, and deleting records
- Importing and exporting data
- Working with layout themes
- Using layout parts and tools
- Formatting layout objects
- Finding and sorting data
- Creating value lists
- Printing and saving
- Building reports, including subsummary reports and quick charts
- Using the Calculation dialog
- Creating and triggering scripts in the Script workspace
- Working with script triggers