2 Replies Latest reply on Jan 12, 2011 7:03 AM by JoelCornette

    Simple Find to filter records by selection made from a Popup window

    JoelCornette

      Title

      Simple Find to filter records by selection made from a Popup window

      Post

      Looking for simple way to have a popup window to "pop up" over a current window and prompt for the user for Find -- the user selects criteria from a previously defined Drop box list. I can perform the process manually with another layout that I switch to, perform a Find, then go back to the previous layout.  Like to see if I can do this with a popup window. 

      I have attempted to create a script with New Window for the popup that has a Go to Layout with a single field and represented by a Drop box list on,  Need to enter Find mode on entry, select the value from the list, then push a button to Apply (desire is to have records are found, script quits and closes window and returns to previous window) ... however, when executed it does not work for the Window in the background -- only works for the front window the popup. Using Select Window in the script just moves the window contents to the popup. 

      Basically, have a set of records with a field values "Lions, Tigers and Bears" and like to do a popup that helps find only records with say, "Lions" ... where Lions is selected via a List from the popup. 

      Thanks ...        

        • 1. Re: Simple Find to filter records by selection made from a Popup window
          FentonJones

          Each window has its own found set. It is difficult to "pass" the found set; other than a Copy All Records routine using the IDs, or a Loop to gather them, or a Custom Function made for this (there are a few). I kind of have to wonder, why not just do this on the original layout, since that is where you want to end up? I don't see much reason to do a popup window. The "search" field could be a global field in the header (which would allow criteria entry to work in Browse mode). You could attach a script trigger to it, to activate a Find script, or you say, a button to run it.

          If you really want the popup window, you could just keep the popup window, close the original window, and rename the popup menu to the original window's name (or the file name, if only 1 window remains).

          • 2. Re: Simple Find to filter records by selection made from a Popup window
            JoelCornette

            The reason for the additional popup window is to help isolate specific records for viewing / editing .. like a filter.  If I have a 100 records in the database, only 10 maybe "Lions" and 5 "Bears" and so on.  I am hoping to make this a standalone app so l am trying to create an easy way to filter the data and reduce the "working size" of the data set. This task can be done on the current layout by entering Find mode, location the field, selecting the entry, and perform Find. Just thought if I could label a button Filter and allow to Find specific records it would be easier.   This is kind of like using the Data -> Filter -> AutoFilter in MS Excel ...  Actually trying to replace using MS Excel with a real database like FMP -- the actual size of the MS Excel I would like to replace currently exceeds 45,000 entries ... or 45,000 records.  

            Thanks ... you've given me a few extra thoughts.