1 Reply Latest reply on Mar 6, 2016 11:59 AM by MaxEh

    Automated script with several filters and date range


      Hello all,

          New user here. Trying to create a script that will do the following:

      1. Check text box to grab user name

      2. Find all records that user has modified in the past week - this part must be automated, I don't need a manual date range selection.

      3. Return the number of records that user has modified - pretty sure this part happens automatically.



         So far I've created a button that launches a script. The script performs a find on the UserName box, so I believe that step 1 is complete.

      I am then attempting to Insert Current Date, and would like to run a search from Current Date -7 days. I am struggling with the syntax for this. Each example I've found on this site only allows for specifying set dates, which I don't want. I want to click on a button and have a report from the last week pop up.


         Any help would be greatly appreciated - thank you in advance!!

        • 1. Re: Automated script with several filters and date range

          In your script that currently finds the person you just need to add an extra find criteria.


          Enter Find Mode // in your current script

          Your Name find script step is here however you have set the field

          Set Field [ YourTable::YourDateField; Get ( CurrentDate ) - 7 & "..." & Get ( CurrentDate )]

          Perform Find [no pause] //this should already be in your script


          There are many other approaches as well depending on what you mean by the past week e.g. only the last 7 days or if you are running the script on a Monday and you want everything from the past Saturday (2 days ago) to the previous Sunday, or it is Thursday (or Monday) and you want everything back to Sunday (the last 5 days or 2 days). Each option requires different scripting but could all be done in one script where the user can be prompted which time period to pick.