2 Replies Latest reply on Apr 10, 2013 1:30 PM by Stonely

    Scripting Find with data from a field

    Stonely

      Title

      Scripting Find with data from a field

      Post

           I have four fields in a layout:, each of which is filled by drop down menu consisting of numerous options for meeting selection: (1) future date; (2) group assignment 1; (3) group assignment 2; (4) group assignment 3. The drop down options presented for #2, #3 and #4 are identical. I want to develop separate lists for each future meeting and specific group assigned to for that meeting, no matter what field the assignment is made in.

           I have developed a script to find, for example, those assigned to "future date 1" and "planning group" with no problem. I would like to use this script to, for example, find members assigned to "planning group" for each of the remaining future dates without having to develop individual scripts for each option, resulting in a huge number of scripts. Ideally, I would like to find all members assigned to a future date, then use (copy/paste?) the date used in that script in the script to, for example, find members assigned to "planning group" for each future meeting. 

           Any suggestions would be greatly appreciated, as I've tired to solve this issue for some time.

            

        • 1. Re: Scripting Find with data from a field
          philmodjunk

               Your find script would be simpler if you had a related table where up to three grou assignment records could be created instead of having three separate fields in the same record.

               If you select from a dropdown formatted global field, a script can search your table for that value in all three fields by creating a separate "request" for each field. That will then find records with the specified value if if a matching value is found in field 1, 2, OR 3.

               Enter Find mode []  --> clear the pause checkbox
               Set Field [YourTable::Future date ; YourTable::globalDateField ]
               Set Field [YourTable::group assignment 1 ; YourTable::GlobalGroupField ]
               New Record/Request
               Set Field [YourTable::Future date ; YourTable::globalDateField ]
               Set Field [YourTable::group assignment 2 ; YourTable::GlobalGroupField ]
               New Record/Request
               Set Field [YourTable::Future date ; YourTable::globalDateField ]
               Set Field [YourTable::group assignment 2 ; YourTable::GlobalGroupField ]
               Set Error Capture [on]
               Perform Find []

          • 2. Re: Scripting Find with data from a field
            Stonely

                 Phil--

                 Thanks so much. I spent quite some time on this without success. That has been the case whenever I have tried doing a relational data base. Maybe it's because of my age (70), but I just can't grasp the basic concepts, nor do I have time to. If we go ahead with this undertaking, I'll probably go ahead and develop scripts for each option.

                 Thanks again for your suggestion.

                 Stonely