1 Reply Latest reply on Feb 21, 2012 10:56 AM by philmodjunk

    Perform Find for todays date

    eekamouse

      Title

      Perform Find for todays date

      Post

      Hi I know the "Today" Function was phased out a while ago. 

       

      Is there a simple way to have a script use a date field to find any values from the current day using Get(CurrentDate)

       

      or have this scnenario work

       

      copy (datefield) all contents

      enter find mode

      paste (datefield) all contents

      perform find []

      this one works until the peform find script step which will not activate

        • 1. Re: Perform Find for todays date
          philmodjunk

          I don't recomend using copy and paste in a script if there is any possible alternative.

          To find today's date in a script:

          Enter Find Mode [] //clear the pause check box
          Set field [Yourtable::YourdateField ; Get ( currentDate ) ]
          Set Error Capture [on]
          Perform Find[]

          To find a date entere/selected in a date field with global storage:

          Enter Find Mode [] //clear the pause check box
          Set field [Yourtable::YourdateField ; YourTable::YourGlobalDateField ]
          Set Error Capture [on]
          Perform Find[]

          To find a date entere/selected in a date field that does not have global storage:

          Set variable [$Date ; value: YourTable::YourDateField]
          Enter Find Mode [] //clear the pause check box
          Set field [Yourtable::YourdateField ; $Date ]
          Set Error Capture [on]
          Perform Find[]