8 Replies Latest reply on Mar 22, 2012 11:51 AM by JeremyTurgeon

    Display Image from Drop Down Menu



      Display Image from Drop Down Menu


      I have a basic drop down menu created for our different chair setups (classroom, conference, etc.) and I'd like to display what the room looks like with these different options using an image below the drop down.  How can I do this?



        • 1. Re: Display Image from Drop Down Menu

          I read that as you select a chair set up by name from the drop down and see an image to match appear below it.

          Create a table with two fields:

          ImageName (text)
          Image ( container field )

          Create a record for each set up, entering a unique name and inserting the image into the container field.

          Link the layout where you will place the drop down and image to this field like this:

          LayoutTableOccurrence::ImageName = Images::ImageName

          Define LayoutTableOccurrenceImageName as a value list of Image names from Images::ImageName

          Place Images::Image on the layout below the drop down list.

          • 2. Re: Display Image from Drop Down Menu

            I'm sorry but I'm pretty new at FileMaker (1 day old), I got as far as creating the columns and data but I don't know where to insert the code you're refering to.

            • 3. Re: Display Image from Drop Down Menu

              There is no code in my last post.

              LayoutTableOccurrence::ImageName = Images::ImageName

              Is created in Manage | Database | Relationships by dragging from ImageName in one "box" to ImageName in the other.

              Let me know the names of the actual fields and tables as found in Manage | database and I'll show you how to set up the value list if you find you need help with that part.

              • 4. Re: Display Image from Drop Down Menu

                Thanks a lot.  Here's a screenshot of what I have currently.

                • 5. Re: Display Image from Drop Down Menu

                  You need to click and drag from ImageName to Image name in this window to link them in a relationship. This will produce a line linking these two table occurrence boxes with a relationship line.

                  Why is "test2" in a table external to your file? As a new user, keeping all tables in the same file will be much easier for you to work with. (I can tell the table comes from anothe file due to the fact that the occurrence's name is shown in italics.)

                  • 6. Re: Display Image from Drop Down Menu

                    Oh, good idea.  I just figured out how to add an additional table instead of making a new file with a completely new database. :)  So, I've linked the two text fields of ImageName but those only have text in them.  How do I use that link to utilize what's in the Image container, namely the actual images?

                    • 7. Re: Display Image from Drop Down Menu

                      I'm going to use the names shown in your last screen shot. If you've changed them, you'll need to use those names in place of what I will use.

                      Go to the layout for Test and enter layout mode.

                      Select the ImageName field and use the inspector (click i in the status area at top right on your screen to make the inspector appear) to change it form an Edit Box to a drop down list. Click the pencil button next to the "values from" drop down to bring up Manage | Value Lists. Click New to start a new value list, select "use values from a field" and specify that the value list list values from the imageName field in Test2.

                      If you want, you may select the "auto-complete" option so that users can type a few letters in the drop down to either select a specific image name or reduce the list to just those image names that start with those letters.

                      Click OK until you've closed all dialogs and are back to your layout.

                      At the top of the screen, you'll find a field tool. Drag and drop from it to add a field to your layout. This opens the specify fields dialog. Select Test2 from the drop down at the top and then click Image to select that field as the field you want to add to the layout. After you click OK to dismiss the specify fields dialog, you can drag the field to position it more precisely where you want it and you can drag a corder to modify the size to fit your needs.

                      Now return to browse mode and try selecting different image names in the drop down. (This assumes that you have already used the Test2 layout to create records and insert pictures into the Image field.)

                      • 8. Re: Display Image from Drop Down Menu

                        I'm still not sure how that did it, but it did!  Thanks for all your help!