4 Replies Latest reply on Nov 17, 2009 4:07 PM by CountryBoy1

    Restoring a Found Set

    CountryBoy1

      Title

      Restoring a Found Set

      Post

        If a Constrained Found Set is performed on a Found set and no records

      are found, the FileMaker Error handler gives a choice of "Modify Find",

      "Continue" and "Cancel".  The Cancel will restore the Found set.  Is

       there anyway to do the same thing in Script ?

        ps:  I don't want to restore ALL records, just want to restore the

              original Found set.

         Thanks for your help.  CountryBoy1

       

       

       

        • 1. Re: Restoring a Found Set
          StellaLuna
            

          Hey countryboy,

           a method I read about and now use is that, before constraining, open a new window then set error capture on and if no records found, close the window. You'll be back on your set before the constrain.  

          • 2. Re: Restoring a Found Set
            philmodjunk
              

            Another alternative that avoids the "window re-size bug" caused by using New Window on a Windows platform:

             

            Create a new layout and base it on a different Table Occurrence than your first layout, but with the same data source table. Make a script that:

             

            Freezes the window

            goes to this new window

            Set error capture

            perform find

            use get (found count) to check for records If none found, go back to your original layout.

             

            Since the layout is based on a different table occurrence, the find will not affect the found set of your original layout.

            • 3. Re: Restoring a Found Set
              CountryBoy1
                

              Dear Stella Luna

                      Tried your method and got it to work.  Had to play

               around with the order of the statements and placed the

               new window far enough off screen that it isn't seen. 

                      A Custom Dialog Box tells the user that no records

               were found.  The original Found set is still available in
               the table layout

                 Thanks for your help.  Sincerely, CountryBoy1

               

               

                        

               

              • 4. Re: Restoring a Found Set
                CountryBoy1
                  

                Dear PhilModJunk

                      I got the idea from Stella Luna to work, but in reality, I think I'm

                 doing about what you suggested.  I don't freeze the original

                 window but I think I'm doing everything else in the order that

                 you list.

                       You have helped me before and I appreciate it.

                           Sincerely, CountryBoy1