9 Replies Latest reply on Mar 14, 2011 4:39 PM by CarlJones

    Script with "Perform Find"

    CarlJones

      Title

      Script with "Perform Find"

      Post

      I have several saved finds. I have a couple of scripts that were simple to set up with my saved finds. Now I am having difficulty setting up a script in the same fashion, however my saved find is from a checkbox in a value list. I have a saved find for every box in the list but when I go to setup a script, the saved finds are not showing up for the value list. How do I correct this or set up a find for each value. As an example, I want the script to perform a find for each record that has a check or X in the Analysis box only.

      System_Input.jpg

        • 1. Re: Script with "Perform Find"
          philmodjunk

          You can't use a saved find in a script as far as I know. You can add Perform Find to a script and then specify the same criteria that you used in your saved find, but I try not use that method. The criteria used in such a find aren't immediately visible and that gets annoying if I need to check the script several months later and can't remember the criteria specified. (I'd have to double click the script step before I could see the criteria.)

          Here's a scripted approach that would find all records where the Analysis value was selected by clicking its check box where the criteria can easily be seen in the script editor:

          Enter Find Mode[]
          Set Field [YourTable::YourCheckBoxField ; "Analysis"]
          Set Error Capture [on]
          Perform Find[]

          • 2. Re: Script with "Perform Find"
            CarlJones

            I was able to use one saved find in a script. I tried your example and it goes into the find mode and stops.

            • 3. Re: Script with "Perform Find"
              philmodjunk

              check the scritp again:

              I suspect the Pause option is selected for Enter Find Mode. In which case it will read as Enter Find Mode [pause] instead of just Enter Find Mode[]

              • 4. Re: Script with "Perform Find"
                CarlJones

                It was.... Working great. Thanks again. I didn't see the check box for pause.

                • 5. Re: Script with "Perform Find"
                  CarlJones

                  The script you provided me is Working great. I tried to add or extend the search in the script... For example the first find will be the "Test" box. In the same script, I also want to add the "Demonstration" box. I tried looping, AND, and neither worked for me. Is there a way that I can add "Test" and "Demonstration" in the same script. Thanks

                  • 6. Re: Script with "Perform Find"
                    philmodjunk

                    The exact method depends on details I don't know for sure about your database.

                    In your screenshot, do you show one field with 8 values in a single checkbox group or is this 8 different fields?

                    Do you want all records with Demonstration selected AND Test selected or all records that have Demonstration selected OR Test selected?

                    • 7. Re: Script with "Perform Find"
                      CarlJones

                      I have one field with 8 check boxes, and I want to capture either both selected or just one selected. So I guess "and" and "or".

                      • 8. Re: Script with "Perform Find"
                        philmodjunk

                        You can't have both in the same find any more than you can have both in the same search if these were paper records.

                        For an Or based search, you put each criterion into separate requests:

                        Enter Find Mode[]
                        Set Field [YourTable::YourCheckBoxField ; "Test"]
                        New Record/Request
                        Set Field [YourTable::YourCheckBoxField ; "Demonstration"]
                        Set Error Capture [on]
                        Perform Find[]

                        For an And based search, both both criteria into the same request:

                        Enter Find Mode[]
                        Set Field [YourTable::YourCheckBoxField ; "Test Demonstration"]
                        Set Error Capture [on]
                        Perform Find[]

                        • 9. Re: Script with "Perform Find"
                          CarlJones

                          OK, I will take a different approach. Thanks....