3 Replies Latest reply on Mar 4, 2012 1:44 PM by bookalaka_1

    Help with a date range (find Script)



      Help with a date range (find Script)


      I have reviewed topics on scripts used to perform date range searches, however I have not found the calculation I need or maybe I not looking for the right calc.


      I have a field called "Date_Com_Closed" and I would like to find a range for that specific field. This is where I need the help i think this is where I start


      Insert Calculated Result [Select; ????? &  " ... "  & ??????]


      and how or what fields would I need to show on the layout

      I was thinking a StartDate 

      and a ClosedDate

      and then relating those to "Date_Com_Closed" (How would I do this)

        • 1. Re: Help with a date range (find Script)

          Howdy kilbot,


          Are you just trying to do the find, or trying to enter two dates into fields and hit a "find between these" button?


          For a find, simply enter find mode, type in 2/6/2009...3/13/2009 and hit enter.


          For a find layout, it is not a calculation, but a script:

          Have two global fields gStartdate and gEnddate

          Have the button run a script like:


          Enter Find mode

          Setfield [ Date_Com_Closed ; gStartdate & "..." & gEndDate ]

          Perform Find


          You're running into a wall trying to calculate something...there is no calculation.

          • 2. Re: Help with a date range (find Script)
               If you are trying to display related records in a portal based on a date range, that can also be done using some inequality operators in your relationship. Post back if that's what you need here.
            • 3. Re: Help with a date range (find Script)

              Hi Phil,

              I would like to the know the answer to "displaying related records baed on a date range". Currently I use a global date field to show my records by single day how can I expand to multiple days? 

              Thank you,