3 Replies Latest reply on Jul 27, 2016 12:05 PM by philmodjunk

    Insert Picture button script




      I am new to FileMaker and slowly trying to figure out how to use it. I'm creating a database of student records and would like to add an Upload button so that users can insert pictures from the computer for each student. My "database" solution has a relationship with "studentphotos" solution where the pictures are set up based on student ID. The "Image" field from "studentphotos" is on my database layout. I would also like to add the option of deleting the image so that the user could upload another photo. Can someone please help me with what I should do?

        • 1. Re: Insert Picture button script

          Do you want your database to have and maintain a photo that is separate from the "studentphotos" solution or do you want any uploaded (inserted) photo to update the one found in the studentphotos solution?


          Some "homework" that can help you get up to speed.

            Read up in help and other sources on container fields. These are the fields that can store or refer to a graphic image such as a photo (as well as non image files). There are different storage options that you can specify for container fields with different pros and cons depending on what you need to do here.


            Read up on the Insert Picture script step. This is the script step that your button can use to insert an image from a location accessible to your user from the computer where they clicked the button. But this may not be the script step to use depending on exactly how you want this to work.

          • 2. Re: Insert Picture button script

            I want it to update the ones found in the studentphotos solution. This solution has the field "Image" of container type. Using the relationship with the database solution based on ID I'm able to see the pictures for each student in my database layout, but only the ones that are available to me. The rest will be uploaded by someone else.

            • 3. Re: Insert Picture button script

              Then you should use insert picture to insert a new picture into the other solution but use a relationship to link to that record to show the same image inside your solution.


              Note that there are many implementation details to what I have described that depend on the exact set up you are using here from what Host v Client arrangement to what level of access you have to that other solution as well as how it is designed in terms of tables and fields.