5 Replies Latest reply on Oct 20, 2010 3:26 PM by philmodjunk

    How to change Insert File script to Insert Picture script

    MananPatel

      Summary

      How to change Insert File script to Insert Picture script

      Product

      FileMaker Pro

      Version

      11

      Description of the issue

      I cannot find a script for "Insert Picture." I am using the "Insert File" button but it needs to be "Insert Picture" and do not know where to find the script for to insert picture. Help?

      SS_FM.png

        • 1. Re: How to change Insert File script to Insert Picture script
          philmodjunk

          Your file does not appear to have an Insert Picture script. You will need to create your own.

          Open Manage | Scripts and start a new script.

          One of the available script steps is Insert Picture.

          You may want to select the Insert File script in Manage | Scripts and click the edit button so that you can see how it works before creating your own. You can also duplicate this script and then change the Insert File step to Insert Picture.

          • 2. Re: How to change Insert File script to Insert Picture script
            MananPatel

            Thanks for your response, PhilModJunk. I'm not sure if it's the Starter Solution I'm using or not. I tried to see what scripts were available with a different Starter Solution and tried to see what filepath/script an "Insert Picture" button was using and the specified field had "Insert Picture" as an option, but the Starter Solution I'm using, Document Library, doesn't seem to have Insert Picture as a specified script.

            Thoughts?

            • 3. Re: How to change Insert File script to Insert Picture script
              philmodjunk

              I'm not referring to a script. I'm referring to a step you can put in a script you create yourself to insert a picture instead of a file.

              Your screenshot only lists the scripts that someone created in this file. If none of those scripts do what you need, then you'll have to create your own.

              • 4. Re: How to change Insert File script to Insert Picture script
                MananPatel

                Oh my goodness. This is making me want to pull my hair out. I looked at how an insert picture script was used and created one just like it with the picture field as a container. I've tried using "Set error caputure [on], go to field [Document Library::Picture], Insert Picture[]" as well as changing the first to "Allow user abort [off]." Have you created this on your own in the Document Library starter solution?

                • 5. Re: How to change Insert File script to Insert Picture script
                  philmodjunk

                  That's not starter solution that I've worked with. I've simply opened a copy to look at in order to respond accurately to your original post.

                  Did you try your new script out to see what would happen?

                  It sounds like scripting is new to you. You might want to invest some time in a tutorial on scripting or a book on FileMaker that covers scripting.

                  The target container field needs to be present on the current layout and the cursor needs to be in this field before Insert Picture (or any of the Insert steps) can insert the picture. Go To Field is intended to put the cursor in the field for you. Can't see just from your post why Set Error capture or allow user abort should be in that script except maybe as a way to handle a user canceling out of the insert process.

                  There are other ways to insert a picture. You can click or tab into the container field and simply select Insert Picture from the Insert Menu. You can also just open the picture file, copy the picture to the clipboard, switch to FileMaker and paste it into a container field.