1 Reply Latest reply on Apr 19, 2011 12:31 PM by philmodjunk

    Date Sort Script

    MikeEdwards

      Title

      Date Sort Script

      Post

      I'm trying to configure a script which sorts records by their specific dates them ommits those records 7 days or less from today's date. I'm having trouble, which way should I go?

        • 1. Re: Date Sort Script
          philmodjunk

          First, make sure that the date fields are of type date. This won't work for dates entered into text fields.

          Then, don't bother with a sort for this, perform a find instead:

          Enter Find Mode[]//clear pause checkbox
          Set Field [YourTable::YourDateField ; "> " & Get(CurrentDate) - 7]
          Set Error Capture [on] //keeps records not found dialog from interrupting script if no records are found
          Perform Find[]