2 Replies Latest reply on Nov 25, 2012 7:09 AM by MaxwellRobin

    performing finds using buttons

    MaxwellRobin

      Title

      performing finds using buttons

      Post

           Hi all!

           i have 4 buttons that i would like to have find records

           the buttons are as follows:

           "Board Notes" "Work Notes" "Focus Notes" "All Notes"

           pressing each button should find those records.

           i tried it and it only lets me assign one find criteria when i need 3 and a show all.

           how can i do this?

           thank you!

        • 1. Re: performing finds using buttons
          philmodjunk

               "only lets you assign one find criteria"? That would seem to be what you want. Click Board Notes and find Board Notes records. Click Work Notes and find Work Notes records, and so forth...

               Or do you want each button click to add records to the existing found set? That could be done, but then you need a way to start from a found set of zero records.

               A script that can work with the first three buttons:

               Enter Find Mode[]
               Set Field [YourTable::NoteTypeField ; Get ( ScriptParameter ) ]
               Set Error Capture [on]
               Perform Find[]

               Assign "Board Notes", "Work Notes" and "Focus Notes" as script parameters on each of the buttons. If you want the button's script to append those records to the existing found set, use this variation:

               Enter Find Mode[]
               Set Field [YourTable::NoteTypeField ; Get ( ScriptParameter ) ]
               Set Error Capture [on]
               Extend Found Set []

               The last button can simply have Show All Records assigned to it as the button operation or it can perform  a script with that single step in it.

               This reply assumes that the table of Notes is what your layout is based on in Layout Setup | Show Records From.

          • 2. Re: performing finds using buttons
            MaxwellRobin

                 i used the first script mentioned and it works perfectly. thank you!