11 Replies Latest reply on Mar 17, 2009 1:02 PM by adcoleman

    Importing Audio (Quicktime) in a Container Fields

    enyko

      Title

      Importing Audio (Quicktime) in a Container Fields

      Post

      Hi there, in reading "Working with Data in Container Fields" it sounds as if the data is stored in the FMP database. But as I tested it, it seems that it's simply a link to the data file.

       

      For example, my clients voicemails come into my email account. I download that message onto my desktop then import it into my FMP database via "Insert Quicktime". The message is there and plays great. Then I delete the mp3 file from my desktop. Now the message is also gone from the FMP database.

       

      Is this right? Is there a way to import it (and keep it) in FMP?

        

        • 1. Re: Importing Audio (Quicktime) in a Container Fields
          obeechi
            

          You know I just noticed that with OSX when you click on the container field and then choose 

            Insert > Picture

            Insert > Quicktime

            Insert > File

          that in the Finder's Sidebar, there is a media area that shows (which isn't present otherwise in the Finder's Sidebar) 

          With the '> Picture' and '> File' choices, you can deselect the "Store only a reference to the file" in the Insert dialog window. Have you tried to insert as a File? 

          • 2. Re: Importing Audio (Quicktime) in a Container Fields
            adcoleman
              

            A container field can be set to store either (a) a reference to (link to) a file of some kind, or (b) the actual file: image, textfile, pdf, audiofile, QuickTime movie, etc.

             

            If it stores just a reference, then that's what it is -- a link to that object in whatever location you have it initially. Move that object, or delete it, and you break your link.

             

            Generally, with a reference-storage field, you want to keep the files to which you refer in a fixed location. You can set the field so that it will automatically open that referenced file in the app you designate (e.g., a PDF in Acrobat, or in Safari, if you prefer).

             

            With a field set up to store the file itself, the actual file object gets stored within the container. If you want to open it, you have to export it to do so. The original stays in your solution; you export a copy somewhere (your desktop, say), and then do whatever you want with it: open it, attach it to an email, burn it onto a CD, etc. (You can also set such a field so that it will automatically open that referenced file in the app you designate.)

             

            There are advantages and disadvantages to each. I actually have some solutions I've created that include separate fields for each -- a reference field and a storage field. I'll explain why if you like, but let's stick with your immediate issue.

             

            In the solution you're concerned with, Go to View>Layout and then click on whatever button it has to to activate it (probably one that says Insert). That will most likely lead you to a Perform Script>Script sequence. FileMaker comes with built-in scripts for inserting either a reference or an object into a container.

             

            So you can change the function of this field by changing the behavior of the script that controls it. Or you can change your own behavior in relation to it. You can opt to set up a folder (in some permanent location on your hard drive) where you keep files referenced by records in your solution. Or you can revise the script controlling this field so that it stores files rather than references to them.

             

            Let me know if this isn't clear, or if you have more questions.

            • 3. Re: Importing Audio (Quicktime) in a Container Fields
              enyko
                

              For some reason I'm not seeing the "Store only a reference to the file" option when inserting a file. It simply takes me to the dialogue box where I can search & select the file I want to insert. No option to reference the file.

               

              Maybe because I'm FMP 8.5v1? 

               

              • 4. Re: Importing Audio (Quicktime) in a Container Fields
                enyko
                  

                Hey Allan,

                 

                As I just posted, maybe I don't have this option for since I'm FMP 8.5v1. I definitely want to store this file within the container but if I understand your post correctly, I would still have to export the mp3 (for this example) to play it? That sounds odd since, the way it's working now, it simply plays right in my FMP database:

                 

                 mp3 in container

                Thanks 

                • 5. Re: Importing Audio (Quicktime) in a Container Fields
                  adcoleman
                    

                  You've just hit on one of the advantages/disadvantages of storing a reference vs. storing the object itself in FMPro.

                   

                  If you store the object itself (in this case, a QT audiofile), then clicking on it won't play it -- because FMPro isn't an audiofile-player app. So you have to take that file "out of storage," so to speak, by using the FMPro Export function, and put it someplace that your QT app can find it: on your desktop, for instance.

                   

                  I don't know what solution you're working in. However, if you have a solution that's set to actually import and store the file object, and if it's open-source, you can define the Export path and set the Export function so that it will automatically open the exported file in the appropriate app (in this case, QT).

                   

                  The advantage of storing the file object itself within the solution is that it's stored right there, easy to find. The disadvantage is that to utilize it you have to export it.

                   

                  If you've only stored a reference to the file, then it (the file itself) is not embedded within FMPro. It's located somewhere on your hard drive, and what you have in FMPro is merely a link to it. Clicking on that link initiates the standard "open file" procedure, which opens the file within the appropriate app.

                   

                  So the advantage of storing the reference is faster access to the file's content. The disadvantage is that the file is stored outside FMPro, so if you move or delete it you break the link and end your access to it.

                   

                  What you opt for, then, depends on what matters most to you -- long-term storage security or ease and rapidity of access. FMPro lets you have your cake and eat it too; as I mentioned, in one solution I've evolved I store a reference to the file on my hard drive and store a duplicate copy of it within the solution (one reference field and one storage field) in the layout.

                  • 6. Re: Importing Audio (Quicktime) in a Container Fields
                    adcoleman
                      

                    I'm post-newbie but pre-developer myself. So you may need someone more savvy than me for this. Having said that:

                     

                    Without knowing what solution you're using, or how it's set up, hard to tell you what the exact scripts are that control import/export functions in your container field(s). They're either FMPro's standard scripts or else new scripts. They'd probably have titles like Insert Document, Insert Image, Export File (if the field is set for storage of actual file objects) or Insert Reference (if the field is set simply to store a reference/link to the file object elsewhere on your hard drive).

                     

                    You should be able to identify the relevant scripts by going to View>Layout and clicking on the field itself or, if it's button-managed, clicking on the associated buttons. One of these should lead you to a scripts-function layout that will show you the name of the script activated.

                     

                    You would then go to File>Manage>Scripts to view and edit/modify the script controlling that field, if you want it to behave differently. You can also just go there and look for scripts titled as above, and then take a peek under the hood by highlighting each and clicking on Edit, which will show you how they're set up.

                     

                    (Caution: Don't mess with these unless you know what you're doing. If you want to poke around in there, make a copy or clone of your solution and experiment on that. With FMPro, as with medicine, remember the Hippocratic oath: First, do no harm.)

                     

                    This should work the same with FMPro 8.5 as it does with release 9 or 10. I'm using solutions that date back to FMPro 7 that have container fields that work as I've described.

                    • 7. Re: Importing Audio (Quicktime) in a Container Fields
                      adcoleman
                        

                      Again, without knowing the solution you're using . . . sounds as if the developer thereof has created a QuickTime window within the layout, which makes it appear as if your mp3 file is playing within your solution.

                       

                      Similarly, I can create a browser window within a solution that lets me view a web page within the solution.

                       

                      However, in neither case is that mp3 file or that web page actually stored within the solution. My viewing of this content is based on links to it stored within the solution, but the content is elsewhere.

                       

                      If you can tell me how you activate the Insert QuickTime function I may be able to offer some more specific advice. I'm guessing there's a button for this next to or under the container field, yes? 

                      • 8. Re: Importing Audio (Quicktime) in a Container Fields
                        adcoleman
                          

                        You write, "I definitely want to store this file within the container." My question would be, Why?

                         

                        When you store an actual file object within a container field, the solution itself gets bigger. In the case of image files, audio files, or video files, this growth becomes exponential. And the bigger the solution becomes, the harder your computer has to work to run it in FMPro, and the more memory FMPro requires to function efficiently.

                         

                        A stored reference to a file outside the solution takes up almost no memory, by comparison.

                         

                        If you need to transmit these files to other parties (say, as email attachments) on a regular basis, I'd see some advantage to storing the mp3s within your solution: You'd export them from there to your desktop as needed, then attach them from there to your outgoing emails.

                         

                        But if you just need to have access to their content for your own purposes, I'd advise you to set up a folder to hold them somewhere on your hard drive -- a permanent location -- and dump them in there, perhaps first giving them a date and sender name as filename, for easy identification.

                         

                        They'll be outside your solution, thus not encumbering it with multigigs of data; you can open and listen to them with a single click from within your solution whenever you need to do so; and, if you do need to transmit any of them to anyone else, you can always go to that folder and extract that particular mp3 for that purpose.

                         

                        Let me know if this makes sense. 

                        • 9. Re: Importing Audio (Quicktime) in a Container Fields
                          adcoleman
                            

                          By the way: Obeechi wrote,

                           

                          You know I just noticed that with OSX when you click on the container field and then choose 

                            Insert > Picture

                            Insert > Quicktime

                            Insert > File

                          that in the Finder's Sidebar, there is a media area that shows (which isn't present otherwise in the Finder's Sidebar) 

                          With the '> Picture' and '> File' choices, you can deselect the "Store only a reference to the file" in the Insert dialog window. Have you tried to insert as a File?

                           

                          This might very well work; sounds as if that checkbox gives you the option of storing an actual file object vs. storing a reference. But, in relation to my last post, I'd assume that the developer of the solution in question specifically didn't encourage the insertion of QT files because they take up vastly more memory than the average texfile or pdf or jpeg/gif.

                           

                          If Obeechi's suggestion works, then you can store whatever you want in that field. But my advice re storage within the solution vs. storage outside it stills holds.

                          • 10. Re: Importing Audio (Quicktime) in a Container Fields
                            enyko
                              

                            Thanks for all the great info! I'm actually the guy who setup the database (no developer skills but thanks for calling me one). That box is a simple container and I just did the Insert > Quicktime function to import the (reference) the mp3 file.

                             

                            Your explanation made perfect sense. The reason I want to store the mp3 in the container is because this database is shared among users who are in different locations so the reference to the file wouldn't work. So my conclusion would be to import the actual file and then have to export it each time we need to listen to it. Not ideal but I understand how you explained FMP is not a media player and isn't designed to do so.

                             

                            Thanks! 

                            • 11. Re: Importing Audio (Quicktime) in a Container Fields
                              adcoleman
                                

                              Glad to help. This is actually my maiden voyage in the forum as a source of advice. Till now I've been the one needing assistance. So it's good to have a payback opportunity.

                               

                              One last thought: If your group connects via a central server then you could create a folder for the voicemail files at that server, with everyone accessing a given voicemail mp3 via references/links instead of everyone having to store the mp3s in their own copies of the solution. I don't have any server experience, so I can't tell you how to do that, but someone else here at the forum surely can. If that seems promising, post another query with that concept in the header.

                               

                              Thanks for the kudo.