1 Reply Latest reply on Apr 10, 2015 6:47 PM by philmodjunk

    script to only go back from 365 days from today

    DavidHung

      Title

      script to only go back from 365 days from today

      Post

      I am putting together a database to manage my employees, I am working on the time off report and only need the entry that are with in the past 365 days. I am having an issue with this so could someone help me with the scrip. I want the report to just automatically pull the past 365 days from today. whenever I pull the report.

        • 1. Re: script to only go back from 365 days from today
          philmodjunk

          This might be a relationship used to refer to related records dated from today's date to 365 days ago, a scripted find pulling up a found set of records in that date range or even data accessed via ExecuteSQL.

          For a scripted find, you can use this script:

          Enter Find Mode []
          Set Field [YourTable::dateField ; ">" & Get ( CurrentDate ) - 365 ]
          Set Error Capture [on]
          Perform Find []

          This is patterned after the many different scripted find examples found here: Scripted Find Examples