4 Replies Latest reply on Oct 23, 2008 3:33 PM by TSGal

    how can I search one table twice in a single layout

    odm

      Title

      how can I search one table twice in a single layout

      Post

      Hi 

      What Im wanting to do is creat a form that will allow me to search a table twice with two totaly unrelated search criteria to return different results of which there will be only 1 matching record. 
       
      Eg
      in the first search box i seach for the entry number 100  in the second I search for the participate 250 I then want filemaker to show me both results side by side.
       
      I feel that I'm missing something stupid but how would I make this possible? 

        • 1. Re: how can I search one table twice in a single layout
          TSGal

          odm:

           

          Thank you for your post.

           

          Perform a find like you usually would for entry number 100.  Then, pull down the Window menu and select "New Window".  In the second window, perform a find for participate 250.  You can then put both windows side by side to see both results.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: how can I search one table twice in a single layout
            odm
               Tsgal thats great is there any way i could script that so that two windows opened when the database was opened? 
            • 3. Re: how can I search one table twice in a single layout
              Sorbsbuster
                

              If you mean that the search criteria are always on the same two fields, then why not have a form with two portals on it, side-by-side:

               

              The left portal is:

              - at the top of portal one is a global field (RecordNumber, say)

              - the portal below has only one row (if you are certain there only ever will be one matching record)

              - the portal's relationship is a self-relationship back to the same table, using the global field

              gRecordNumber =  RecordNumber

               

              The rightportal is:

              - at the top of portal twois a global field (ParticipantNumber, say)

              - the portal below has only one row again

              - the portal's relationship is a self-relationship back to the same table, using the global field

              gParticipantNumber =  ParticipantNumber

               

              Strictly speaking you don't even have to have a portal, just two rows (or two side-by-side, or below-each-other) of the fields of data you want to see in the record(s) when they are found.

               

              One window, two data-entry fields, and two rows (columns, whatever) of the data you want to compare.

               

              HTH,

              Alan.

               

              (Mark II version: if the search fields may not always be the same ones, but maybe one of 3 or 4, there are ways that the global search field can be made to check any one of several matching fields.)

               

              • 4. Re: how can I search one table twice in a single layout
                TSGal

                odm:

                 

                Yes, you can script that!

                 

                In your script, you can perform the first find, open a new window, and perform the second find.

                 

                Your script would look something like the following:

                 

                Go to Layout [<specify your layout> ]

                Perform Find [Restore]

                New Window []

                Perform Find [Restore]

                 

                Then, after the script is created, pull down the File menu and select "File Options..."  Under When opening this file, check the option to Perform Script, and select the above script.

                 

                Let me know if you need any clarification.

                 

                TSGal

                FileMaker, Inc.