3 Replies Latest reply on Feb 2, 2014 7:25 AM by philmodjunk

    Sorting from Two Drop downs



      Sorting from Two Drop downs



           I am wondering if someone might have an example of multiple finds using multiple drop down menus. The TO has a record list with two categories one being "Type" and the Second being "Color", I want the user to be able to pick from the sort list key and pick from the "Type" = Dry, Sweet, Bitter  etc and then filter further  with the second drop down "Color". Red, White, Rose

           I have been able to get the first drop down to find by "Type" but have not been successful in constraining the found set when the second drop down is selected. Each record has its own field defined by type and color

      Thank you for direction.




        • 1. Re: Sorting from Two Drop downs

               Give the field for each drop down global storage.

               The second drop down's script would be something like this:

               Enter Find Mode []
               Set FIeld [YourTable::Color ; YourTable::gDropDownListColor ]
               Sett Error Capture [on]
               Constrain Found Set []

               For more scripted find examples, see: Scripted Find Examples

          • 2. Re: Sorting from Two Drop downs

                 Hi Phil,

                 this works pretty well however it allows me only one 2nd search. How would I refresh? for example

                 Pull Dwn 1  search is "Red"  shows 10 records.  Pull Down 2 search is "Sweet" Shows 3 records. User changes the pull down to "Sour"

                 and no records  show up even though they are there. When I Refresh Pull down 1 a second time and then select sour it is found. How would I constrain the first set while multiple pull downs are executed so the user can switch multiple times without have to reset pull down 1?

            I played around with extend and some if statements but haven't had much success.

                 Thanks for help. 





            • 3. Re: Sorting from Two Drop downs

                   Enter Find Mode []
                   Set Field [YourTable::Color ; YourTable::gDropDownListColor ]
                   Set Field [YourTable::Type ; YourTable::gDropDownListType ]
                   Set Error Capture [on]
                   Perform Find[]