1 Reply Latest reply on Jul 17, 2013 10:17 AM by philmodjunk

    Script Trigger for "Add a Document Button" and Scroll

    JenSmith

      Title

      Script Trigger for "Add a Document Button" and Scroll

      Post

           Hi - I'm adding on to an existing template that FileMaker Pro provides - the "Contacts" template. And I am having trouble creating an "Add Document" button. Basically I'm not sure what I'm doing wrong with the Script Trigger. I would like to be able to hit the "Add Doc" button and have a field appear where I can drag a file into. Can someone please let me know if I'm trying to accomplish this in the wrong way?

           Ideally I'd like to be able to add a scroll function because each contact may have a varying number of documents associated.

           Thank you in advance!

            

            

        • 1. Re: Script Trigger for "Add a Document Button" and Scroll
          philmodjunk

               The only "trigger" for a button is to use Button Setup to select the Perform Script option. You then select the script you have created for this action. The script can change to a layout with a container field for your document or it can open a new window with a layout that has the container field. Or you can set up a tab control or add a new tab to an existing tab control and not need any script as you can then place the container field inside the tab panel to be revealed when the user clicks on the label for that tab panel.

               

                    Ideally I'd like to be able to add a scroll function because each contact may have a varying number of documents associated.

               A portal to a table of related records with one container field can be added to your database so that you can add as many documents as you need.

               But keep in mind a key detail about drag and drop: When you drag and drop a file into a container field, you store a copy of the file in the container field and this action is the equivalent of clicking in the container field and then using Insert Picture to insert the file with the "store a reference" option NOT selected. This may not produce the best possible results for what you want to do with these documents.