3 Replies Latest reply on Sep 9, 2013 12:03 PM by ptrc

    Scripting Question

    ptrc

      Hello Everyone,

       

      I have been working on a solution to manage conference call lines and their availability. I am looking to script a search that would show what lines are available for a certain day and time.

       

      I am not set on any structure yet and would like to create something efficient with the ability to expand.

       

      Specs:

       

      8 conference call codes scheduled for approximately 2 hrs. System needs to determine what codes are free at a specific time and assign that one. (Similar to a hotel booking, but in hours).

       

      I was thinking a parent table of bookings and a child table of availability.

       

      Any thoughts?

       

      Peter

        • 1. Re: Scripting Question
          davehob

          Hello Peter,

           

          My first thought is that this isn't a scripting issue, or a searching issue, but one that can probably be solved by relationships.

           

          In my application, there's a room booking function, which sounds functionally similar to what you're trying to achieve.  In my situation, there are Sessions (with a date, start time, and end time).  Each Session has a number of Resource Bookings (the Resource Bookings table being the join between Sessions and Resources).

           

          I have a relationship that uses globals in the Sessions table (x_Date, x_TimeStart, x_TimeEnd) to determine which Resources are booked at a given time (Sessions > Sessions Now > Resource Bookings > Resources).  So from Sessions, it's possible to list all Resources booked during a given time period.

           

          Then there's a calc field in Sessions called ResourcesAvailable, which is basically a list of all Resources which aren't in the list of booked Resources, and these are offered to the user as being available.  The calc uses the excellent FilterList custom function (see Brian Dunning's site), i.e. something like

           

          FilterList (

          List (SSN to RSC ~ All resources::RSC__kp_ID);

          "NotEquals";

          List(SSN to SSN to RBK to RSC ~ BookedResources::RSC__kp_ID);

          0);"")

           

          So no scripting or finding, and the list of available resources is "always" up to date.  (I say "always" because there might be refresh issues, but it's real-time enough for my purposes, and we've not had a double-booking yet.)

           

          Might that fit your scenario?

           

          Dave.

          • 2. Re: Scripting Question
            davehob

            Peter,

             

            Was this of any use/interest?

             

            Dave.

            • 3. Re: Scripting Question
              ptrc

              Hi Dave,

               

                   

                     

               

               

                  The information was quite useful. Did not have a chance to try it yet. Have been enroute for business. I will keep you posted.

               

                   

                     

               

               

                  Peter

               

                  —

              Peter M Carr