5 Replies Latest reply on Jul 2, 2009 12:14 AM by thezed

    creat custom search menu in list

    thezed

      Title

      creat custom search menu in list

      Post

      Hi,I have created a list view for my invoices (table Invoices). In the same layout, I would like to add a drop down menu with the list of my clients that would allow me to see the list of invoices for the selected client only.

       

      I struggle to create this list (cannot use the Client_Name form my Invoices table), and to perform the find. Can somebody help me with that?

       

      Thanks,

      S.

        • 1. Re: creat custom search menu in list
          mrvodka
             If you create a global field with a drop down ( or popup menu ) of your clients ( or preferably IDs ) you can use an onObjectExit script trigger on the global field to perform a find for the global field value in your invoice table.
          • 2. Re: creat custom search menu in list
            philmodjunk
              

            It might help if you spell out the details.

             

            "I struggle to create this list (cannot use the Client_Name form my Invoices table)..."

            What keeps you from using this field?

            • 3. Re: creat custom search menu in list
              thezed
                

              OK, so I have set up the script trigger and created a find script. But when I select a Client or Job Number to display only the invoices relative to the client or Job Number, nothing happens, as if the find was not performed (all the records are still in the list)...

              I would like to upload a printscreen of my layout and script but can't find out how... 

              Basically, my script looks like:

               

              Set Variable [ $field_A; Value: Invoices::Search_Client ]

              Set Variable [ $field_B; Value: Invoices::Search_JobNumber ]

               

              If [ IsEmpty( $field_A & $field_B & $field_C & $field_D ) ]

              Show All Records

              Else

              #

              Set Error Capture [ On ]

              Enter Find Mode [ ]

              Set Field [ Invoices::Clients; $field_A ]

              Set Field [ Invoices::Job_Number; $field_B ]]

              Perform Find [ ]

              End If 

               

               

              Thanks again for your help.
              S. 

               

              • 4. Re: creat custom search menu in list
                philmodjunk
                  

                Your script looks correct.

                 

                Do you have a copy of advanced? If so, use the debugger and step through your script. Perhaps there's a script trigger that is interfering.

                 

                You could also try performing this process manually. Can you enter your find criteria and perform the find to get what you want? If you can't I'd check for a script trigger set on the layout that's affecting your script results.

                • 5. Re: creat custom search menu in list
                  thezed
                    

                  Thanks for your answer. It is correct indeed, I had just forgotten to set my search variable as Global...

                  Beginner's mistake :-) 

                  Thanks anyway,

                  S.