3 Replies Latest reply on Aug 25, 2009 8:14 AM by TSGal

    Question about insert Picture



      Question about insert Picture


      Hallo everyone


      i want to select a File with a Openfiledialog and insert it to a layout. According to the different filename extension should different Layout be opened.

      for example,  wenn filename extension is "jpg", go to Layout A, write a new Record and insert Picture

                       wenn filename extension is "Avi", go to Layout B, write a new Record and insert Quicktime



      i dont know how to do it. what i thought ist: skript:insert File -> select a File -> get the filename-> strim the Extension-> if "jpg"->go to the LayoutA->insert Picture with the name i got.

      but the problem is, i can not insert a picture with a Name i don not know at first.



        • 1. Re: Question about insert Picture

          I assume you will have more than one container field.


          A container field can hold a variety of filetypes.

          If there is a reason for separate jpeg files to one container and quicktime files to another container, when you are doing the import (manually?) can't you just select the container field or layout to be used?

          Or is it to be automated with a script?

          What OS? What version of Filemaker?

          David Anders 

          • 2. Re: Question about insert Picture

            yes ,i have more than one container field, or better to say, i have more than one layouts. what i suppose to do is to write 3 layouts. one for Pictures, one for Videos, one for the others.

            with the script i can choose the right one to open the right Layout.


            it is Filemaker Pro 10 

            • 3. Re: Question about insert Picture



              Thank you for your post.


              Your post is a little confusing, as you want to open a file and insert the file, but you don't know the name of the file.


              Assuming your file is always going to be in the same folder, you do have the ability to import files from a folder into a Container field.  Therefore, you may want to import the information first into a Container field in a separate table.  One of the options when importing is to import only a reference to each picture file.  This way, you can capture the File Name and the File Path (although that is already known).  You can then use a PatternCount function to evaluate for JPG, TIFF, MOV, etc.  Store this information to variables.  Depending on the result, you can then select the appropriate Layout, and insert the picture/movie/etc., since you have the path and filename.


              This should point you in the right direction.


              If you need clarification for any of the above steps, please let me know.



              FileMaker, Inc.