6 Replies Latest reply on Aug 15, 2012 9:48 AM by philmodjunk

    Drop-Down List FMP 11

    jb_1

      Title

      Drop-Down List FMP 11

      Post

       HI! I have a dropdown list in a layout of may DB. I hope find file by cheking choice from this drop list ..I have every time the same results found , and I can t make filtering in a drop down list with multiple choice. Thx

        • 1. Re: Drop-Down List FMP 11
          applelakshan1

          in drop down menu you can find only 01 value at a time, however (as i know ) if you can find range of values if you invent another value list and script, lets say 01 field name A and next field name is F, You can give command to find what ever in A....F will filter

          • 2. Re: Drop-Down List FMP 11
            philmodjunk

            If you make your drop down a global field, you can use a script to perform your find and it can even work from multiple selections in the drop down list.

            • 3. Re: Drop-Down List FMP 11
              jb_1

               And how can I make this script?? and where I will ake it?? what will be ?? Sorry Im just starting with FMP11 . THx

              • 4. Re: Drop-Down List FMP 11
                philmodjunk

                By "find a file" do you mean Find a Record?

                If you are just starting out, please invest the time in some training materials. We'll be glad to help all we can, but a forum is best able to answer specific questions where the training materials will produce a broader base of understanding for how you can use FileMaker to get what you want.

                Open Manage | database | Fields and add a new field to your database. Double click the new field's definition or click the options button to open the Field Options dialog. Select global storage on the storage tab of this dialog box.

                Add this field to your layout and format it as a drop down list.

                Here's a sample script to get you started. A script that allows you to find multiple selections would be a more sophisticated version of this one, so get this to work first, then post back if you want the user to be able to select multiple items in the drop down and find all records with any one of the selected values.

                Enter Find Mode [] //clear the pause check box
                Set Field [YourTable::YourField ; YourTable::GlobalDropDownField]
                Set Error capture [on]
                Perform Find []

                You can place a button next to this field to click to perform this script or you can set up the drop down list with the OnObjectSave trigger to perform this script.

                Scripts are created in the script manager. Select manage | Scripts, Click New and then double click script steps listed in the left of the script editor to add them to your script.

                • 5. Re: Drop-Down List FMP 11
                  jb_1

                   Thx Bro..yes , I mean find a RECORD.

                  Add this field to your layout and format it as a drop down list.//

                  I have more than 40 Drop down list in the same layout ; if I will add a new field for every list ; that will be a big big big DB . I will explain you my problem:


                  We have a Drop Down List that contains colors (Black, Red ....) and another of different powers

                  (110HP, 130HP, ...) is an other section consisting  a list of cars.

                  We will, from the drop-down lists, Show the list of cars with the chosen criteria (colors and powers).

                    It has happened a manual solution is adding an operator "==" just before the criterion conenat list (== red);

                  [Right click on the >> list >> Operator "== red ">> Find] (does not work in all cases this manual method). Is it possible for us to make the research automaticaly??!!

                  help?? Thx

                  • 6. Re: Drop-Down List FMP 11
                    philmodjunk

                    yes, and the script that I posted can serve as an example of how to set it up. If you want to include find operators such as ==, this can be done.

                    Here's one example:

                    Set Field [YourTable::YourField ; "==" & YourTable::GlobalDropDownField]

                    To specify criteria from more drop downs, just add more set field steps. You can think of this step as your hidden "secretary" that takes the data from the drop down and types it into the correct field for you, adding any find operators you find useful.

                    You may find the example script near the start of this thread helpful for seeing some of the different ways a set field step can specify find criteria:

                    http://forums.filemaker.com/posts/ba7347f58a