8 Replies Latest reply on Feb 13, 2013 8:44 AM by philmodjunk

    Multiple searches of same selection of records

    pauhana658

      Title

      Multiple searches of same selection of records

      Post

           I would like to be able to search all records and save the found set. Then, I want to search that found set multiple times using different criteria each time. In other words, before each subsequent search, I want to restore the found set from the very first search. 

           I have several buttons for performing that first search and a popup menu of search choices for the subsequent searches. I want to be able to select choices from that popup to find records within the set of records found by the first search. 

            I've tried "Modify Last Find" and "Constrain Found Set," but, while the first subsequent search works fine, all searches after that first subsequent search work only on the "new" found set until there are literally no records left in the found set.

           Of course, I can perform that first search every time before I do a subsequent search, but that offends my sense of user friendliness. Surely there is a simpler way? 

           Thanks!

            

            

        • 1. Re: Multiple searches of same selection of records
          RickWhitelaw

               Assuming you're scripting these finds I see no reason why you wouldn't have a script perform your original find and use perform script step to branch out your Constrain Found Set  needs. If you have FMPA you can use a custom menu too.

          • 2. Re: Multiple searches of same selection of records
            philmodjunk

                 You can also perform the find, open a new window, and do your constrain found set in the new window. To see or return to your original found set, simply close the new window. You can, of course, repeat these steps as many times as needed.

            • 3. Re: Multiple searches of same selection of records
              pauhana658

                   So I take it, then, that FMP 12 has no way to save a set of records and then recall that set at a later time...*sigh!* Think I'll file an ER for this. It is a VERY useful function for complex searches.

                   Rick: Scripting branched steps could quickly become complicated, since I have 4 initial search options and 8 secondary search options. But a custom menu might work. I do have FMPA on my Mac, the hosting machine...would the wife be able to see the custom menu on her Mac running plain-vanilla FMP? And would we be able to see the custom menu on our iPads using FM Go? Think I'll play around with that idea today.

                   PhilModJunk: Yes, opening a second window would definitely work. But I can also simply click one of the initial search buttons again and then perform the secondary search via its popup menu. But a second window does offer one benefit: The initial search could both find the desired records and open a new layout in which the 8 secondary search options are not in a popup but arrayed as buttons. Makes that second search a bit easier, especially on the iPad, where popup menus appear as that rather off-putting dial-a-choice wheel. I'll play with this idea today, too. 

                   Thanks for the suggestions, guys!

                    

              • 4. Re: Multiple searches of same selection of records
                philmodjunk

                     You might play around with the Save/send records as snapshot link option. You may be able to use that option to restore a found set, but to me, simply opening a new window is simpler.

                • 5. Re: Multiple searches of same selection of records
                  pauhana658

                       I think I've found a way to do this without windows or saving record sets. I also needed a way to dynamically set the titles of charts, and found the only way to to that was to store the initial search parameter as a global variable. It occurred to me this morning that I could use that global variable to perform the same initial search before performing the secondary search. Simple to add this step to the code for the secondary search, and the user doesn't have to manually perform two separate searches. 

                       This should work, shouldn't it?

                  • 6. Re: Multiple searches of same selection of records
                    RickWhitelaw

                         You can save find requests in fm.

                    • 7. Re: Multiple searches of same selection of records
                      pauhana658

                           Yep,that's how I did it. A find request. Worked, too!

                      • 8. Re: Multiple searches of same selection of records
                        philmodjunk

                             There are also ways to save a list of primary key values in a single field in a global field or in a record. The key difference between that and saving find criteria, is that a saved list of keys will always bring back the same set of records (assuming none were deleted) where saved criteria will bring up all records in your table that current meet that criteria--which may include new records that didn't exist the first time around or old records recently modified so that they now meet the criteria.

                             Which is the better approach depends on your database and what you are trying to do.