1 Reply Latest reply on Mar 17, 2014 1:44 PM by philmodjunk

    Multiple finds



      Multiple finds


           I'm sorry if this question has a really simple solution.I just can see anything anymore, so I need your help...


           I need to script a find request that would : Let's pretend I have a dispatch center.


           I need to find a driver available to leave on June 5 until June 7.

           Each day of the year is a record for each driver in my table.

           So DRIVER "A" would have 365 records, where each is a day. Same for DRIVER "B".

           I have a Date field, an Availability field and a ID_Staff fied.


           I need to find all driver that:

           Date = Departure date (June 5) and availability is yes

           Date = Return date (June 7) and availability is also yes

           And the find should "find" which has both condition as YES.


           Hope this is clear?

           Please help...

        • 1. Re: Multiple finds

               I am assuming that you have this relationship:


               Drivers::__pkDriverID = Availability::_fkDriverID

               If so, then use two relationships to Tutorial: What are Table Occurrences? of Availability that match to records using both departure and arrival dates as match fields.

               Drivers::gArrivalDate = Availability 2::Date

               Drivers::gDepartureDate = Availability 3::Date

               You can then perform a find on your Drivers layout for records with "Yes" in both Availability 2::Availability and Availability 3::Availability.

               gArrivalDate and gDeparture date would be global date fields.

               For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

               For examples of scripted finds, see: Scripted Find Examples