2 Replies Latest reply on Jun 9, 2011 1:42 PM by Seregil

    excluding multiple listings from search results (not deleting them)



      excluding multiple listings from search results (not deleting them)


      I have a db I've been working on that has many "events" that have occurred. At each even there is a presenter, which has name, contact info, email, phone, address, etc entered in for each event.  Is there a way to search for ALL presenters, but in the results to not show multiple listings?  In other words, say I create a layout with address labels.  I want to get a listing of each presenter onto an individual label, but I don't want duplicates.

      thanks to anyone that can give me a hand with this.

        • 1. Re: excluding multiple listings from search results (not deleting them)

          The key is in how you structure your data. From what you post, you need these tables/relationships:


          Presentors::PresentorID = Eventa::PresentorID

          Names and addresses for presentors would be entered a single time in the presentors table but can be linked by PresentorID to any number of event records. You'd print your address labels from a layout based on Presentors and that way would avoid the existance of any duplicate address labels.

          From your current setup, you may be able to fix this temporarily with a script, but if you are entering the presentor info over and over again into each event record, there is no way to be sure the data for a given presentor was entered exactly the same way each time. The addition of a single extra space character in a name could defeat the folllowing script:

          #First perform a find to pull up the event records you want
          Sort [restore ; no dialog ] (Sort by all presentor name fields so that events for each presentor are grouped together)
          Go To Record/request/page [first]
          Set Variable [$PresentorName ; YourTable::FirstName & YourTable::LastName //adjust this calc to use all of your name fields here]
          Go To Record/Request/Page [next ]
             If [$PresentorName = YourTable::FirstName & YourTable::LastName ]
                 If [Get (RecordNumber ) = Get ( Found Count ) //last record ]
                    Omit Record
                    Exit Loop If [True]
                     Omit Record
                  End If
                 Set Variable [$PresentorName ; YourTable::FirstName & YourTable::LastName ]
                 Go To Record/Request/Page [next ; exit after last]
             End If
          End Loop

          • 2. Re: excluding multiple listings from search results (not deleting them)

            thanks for the response.  Unfortunatelly this is a temp contract and I  don't have time to rewrite the database in its entirety.  Maybe they  should have made this a request on day one lol.  Oh well, I guess this  is what they get for not being up front and clear at the beginning.

            thanks again for the help/suggestion :)