4 Replies Latest reply on Jan 10, 2017 11:46 AM by philmodjunk

    Insert picture script?


      I am trying to create a button for users to upload a picture file into an image container. I've found the "insert from device" for mobile devices. But the "Insert Picture" command does not include a field to specify where to put the picture. How do I specify that? Also, if I want just a standard window to open on the computer for the user to select their file, is that built in or does that need to be specified as well?


      I currently have instructions for users to right click on the container and "insert picture", but wanted to make it slightly more user friendly for non-computer literates.

        • 1. Re: Insert picture script?

          All script steps that start with the word "insert" only work if the intended target field is present on the current layout. If the target field is not specified in the script step's option, the script step tries to insert into whatever field currently has the focus. (has the cursor in it.)


          For reasons known only to FileMaker, the ability to specify a target field was not made an option for this script step. Instead, you have to put the focus in the desired container field first, then execute the Insert Picture script step.


          Both Go to Field and Go To Object can be used to put the focus into the correct field.


          Go to field doesn't require an object name, but if you have more than one copy of a field on your layout--as can be the case especially if using a global field for more than one purpose or when you have several versions of the same portal on the same layout, you can't use it to put the focus in a particular instance of that field. In such cases, you can use the inspector to give the desired layout field object an object name and use go to object to put the focus into the correct field.

          1 of 1 people found this helpful
          • 2. Re: Insert picture script?

            Try this (too lazy to look it up)


            You have to tell FileMaker what field to insert


            go to layout

            Go to Field container (perform)

            insert graphic


            If that doesn't do it, I'll look it up.

            1 of 1 people found this helpful
            • 3. Re: Insert picture script?

              Awesome. Works! That is odd the lack of target integrated in.


              I set up with Insert From Device as well, for mobile users. Insert PDF seems to be the same. Is it just "Insert from Device" also for PDF or is there a different command line (as in there is an Insert Picture and an Insert PDF command, is there only a universal "Insert from Device")?


              PS I just realized ... there is no necessarily saved attachments library in an iPhone or the like. Hmmm.

              • 4. Re: Insert picture script?
                is there only a universal "Insert from Device")?

                Yes as it's set up for iOS use only and thus has to deal with a different architecture. From there you have a list of options. PDF is not one of the options as inserting a PDF can, I believe, be done with either insert file or insert PDF as long as the PDF is located in one of the few places that FileMaker Go can 'reach' in order to insert the file.