3 Replies Latest reply on Aug 10, 2009 2:47 PM by Lyle1

    Searching using a drop-down menu



      Searching using a drop-down menu


      Hello, I am trying to set up a layout that allows you to click on a field (job number) and see a drop-down list of job numbers. When you select something from the menu is acts like a search and brings up the appropriate details for that job in the layout. Any tips on how to do this would be great.





        • 1. Re: Searching using a drop-down menu
             Do you have FMP10?
          • 2. Re: Searching using a drop-down menu

            Define your drop down field as a global field.


            If you use FMP 10, Define a script trigger for the field to perform a script similar to this:


            Enter find mode []

            Set Field [YourTable:: ProjectIDField; YourTable::globaldropdownfield ]

            Set error capture [on]

            Perform find[]

            Set error capture [off]

            //you can do other steps here like sorting your records or popping up a message if no records were found.


            If you don't use FMP 10, then place a button next to the menu and set it to perform this script.


            Which script trigger should you use? Well that can depend on your preferences and what type of menu (Pop-up or drop down) you select.


            I use "On Modify" with pop-ups and "on Exit" with drop downs usually.

            • 3. Re: Searching using a drop-down menu

              Well, this must be some kind of record. I came to this forum to get exactly this answer, and found it in less than a minute! 


              BTW, it appears you need to add the little button next to the drop-down or pop-up to run the script if you are preparing the layout for web access. 


              Many thanks!