Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
There is a special type of field that we haven't reviewed yet, that's called the Container field, and Container fields comprise an important building block for any FileMaker Pro solution, in which you want to store and/or display more than just text, numbers, dates, and times, like we've been working with so far. With the Container field, your database solutions can store and display digital images, videos, play music or sounds, and even store electronic documents, such as PDF or Word documents. The Container field is a versatile data repository that can store any sort of binary data, and binary just is a generic term for data that cannot meaningfully be represented as text.
When we set up our fields in our database, under File > Manage > Database, and you'll see that we set up a field already called CompanyLogo and gave it the field type, Container. So let's use this field to experiment with Container fields and the data that they can store. So once we've got a field defined, which we do already, let's go in the Layout mode, and we're going to practice inserting a Container field into our layout. We'll talk more about inserting fields into layouts when we discuss the chapters on working with layouts, but for now we can either choose Insert > Field, or you can choose, on your toolbar, the Field tool, which we'll use in this case.
Simply click down with your mouse, and you'll see your cursor turn to like a hand that's grabbing a field, and we'll drag that down to an area in our layout, and we'll release it. Now, FileMaker pops up and asks us, what field would you like to place here? We'll say CompanyLogo, and hit OK. Since the Container field can contain images or video or sound, we might want to resize it so that it's a little bit larger so that we can actually see the contents contained within. So when you have a field selected, which you'll see by the handles in the four corners, you can grab any one of the corners to click down, drag, and then release to thus change the size of your field.
You can easily identify Container fields on your layout, because they don't have text baselines, and that the name of field stays centered, regardless of how large you make the field in Layout mode. Now, back in Browse mode, if we go under View to Browse and hit Save for our changes, you'll see that we can click into this area now, and now it will allow us to go under our menu and hit Insert, which allows us to add different types of data into the Container field. You'll also notice that if you right- click or hold down the Ctrl key and click, you get these same options.
Let's start by adding a picture. I'm going to choose Insert Picture and go into our Exercise Files, where we are going to choose this file called author.tiff and then select Open. Now you see the picture we chose in the field, and you'll notice that when you navigate back to the previous record, that image doesn't appear. So just like any other piece of data in a field, any one record will store any binary data, but only for that record where you've inserted it.
Also, once you have data in the field and you click on the field, or the contents, by right-clicking, or in Mac, you can hit Ctrl and then click, you'll notice that we now have the option to Export Field Contents. So this way if I choose this option, you see that it allows me to export out the value that we're storing in the container and save it somewhere else on my database. This isn't quite as dramatic if I am the person who put the value in there, But imagine a database that's shared by various different users. if someone wants to take an image or a sound file or a movie that you've created, they can easily just log into the database, navigate to the record, and then right-click to save the file locally on their own desktop.
You can remove data in the Container field by simply clicking on the field and hitting the Delete key on your keyboard. Now let's try adding a QuickTime. This time we'll do through it Insert > QuickTime. Now let's choose Managing Fields in the Exercise Files, and this time we'll choose a movie. I hit Open. Not only do we see the movie, but we see a bar down here that allows us to play the movie and control the volume, much like we would do so with any other type of movie.
The same is true for sound files. So you can include video clips or audio clips, anything you want, and of course it will be only stored in that one record, and then naturally, any other user can just right-click to export that video out to their own desktop. Let's click inside and hit Delete to clear out that value, and now you'll see, if we insert a file, we can choose a TextFile, and you'll notice that when you click a file, it puts the name of the file with the extension and then an icon that represents that type of file.
For example, if I click in and hit Delete again and hit Insert > File, this time I am going to choose a FileMaker file or a PDF, something that's not a standard file, you'll notice that the icon changes but that the entire name with the extension appear. One of the things you might notice here is that we're adding one file at a time to each container. Now, if you ever need to add more than one file to any one record, so for example, let's say you've got a customer record and you want to store their signature page for the original contract, as well as a company logo, that would require doing one of two things: either creating two container fields, one that would store the logo and then one that would store the signature page scan, or you can take any number of files and zip them together into a packaged set of files, and then you can just store that zipped package in the container as one single file.
Now, there's one very important word of caution here. Your database will increase in size every time you add a file to a container field, and it will increase by the size of the file you are storing. What does that mean? Well, it's not a very big deal when you are adding smaller sized files, like PDFs and such, but if you were to add a four gigabyte video, which of course, four gigabytes is our maximum size capacity for a Container, if you were to add a video clip that was four gigabytes in size, that means now that your FileMaker database has just grown four gigabytes in size.
Imagine if you add assets to Container fields for thousands of records of your database; your FileMaker database will get huge. Don't worry; FileMaker does have a file size limit of eight terabytes, which is pretty enormous, but still you're going to quickly encounter some performance issues when you're sharing your database over a network, or even just trying to import your database via e-mail, or any other kind of system like that. So the best idea is to either make sure you are conscious of the size of the files, or you can use this other option I'd like to introduce you to, which is called storing a reference to a file.
So let's click inside here and hit Delete, and then go under Insert to File and choose one of the files that we want to insert, let's say, for example, this TextFile. But you'll notice in the bottom left-hand corner we have an option called Store only a reference to the file. You'll see when I click on that and hit Open, it still displays the image or file at the same resolution or quality as it always would have if I just embedded the file, but now it's just storing the path to the location of the image, or file, or video using the QuickTime engine to display the image itself.
So since it's only storing a path, it's very small amounts of text rather than this huge video file, or image, or sound or whatever it is you are trying to embed in your files; therefore, storing a path almost has no impact on the overall size of your FileMaker file. This is a much more efficient way to store images or videos and just keep them as a reference for that matter, or movies, or files or whatever you want to store inside of Container field. Just keep in mind that the moment that the path breaks, so will the display of the image. So, for example, if I were to clear this out and insert a picture and choose Managing Fields / 05_06, and this time choose our image, storing only a reference to the file, there we have the image.
But if I open my Exercise Files, and I move that image out, let's see what happens when I navigate back to the record. You'll see here, this file cannot be found. That's because I stored a reference that was specifically from this file to that location. If we move that back to the location and then Refresh, you'll see that it finds the image. Now, this can be very delicate, because if your file is stored on a network, that path is really from the server back to the file, so it can get kind of complicated and you need to be careful with it, but certainly there are ways that you can store this media as a reference, not impacting the performance of your file, but at the same time keep a centralized directory somewhere on your network that all users can use.
It's great for you to use, but if however the purpose of the database itself is to store media or collateral documents in a common location accessible to all authorized users, then embedding the files in a Container field may in fact be the best solution for you. If the file size are large, then what you want to do is get a database that stores files on a hosted server, with plenty of fast storage and network access that all of your users can get to. This way when a user embeds something in a stored directory, that way all users will be able to have access from the FileMaker database back to that path.
FileMaker Pro provides you with a really unique and interesting type of field, the Container field. This allows you in your database solutions to store and display digital images, video, play music or sounds, and even store electronic documents, such as PDF or Word files.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 97877 Viewers
80 Video lessons · 141193 Viewers
59 Video lessons · 59550 Viewers
52 Video lessons · 72834 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.