10 Replies Latest reply on Dec 18, 2013 4:51 PM by philmodjunk

    Script to find records of this week



      Script to find records of this week



           I want to write a script that provides me with a list of all the records (sales) of this current week - being from Sunday to Saturday, regardless of what day we currently are. 

           I found the script in another forum post: 

       Enter Find Mode []

      Insert Calculated Result [Select; Table1:DateSales; (Get(CurrentDate) - DayOfWeek(Get(CurrentDate)) + 1 & "..."&

       (Get(CurrentDate) + 7 - DayOfWeek (Get(CurrentDate))) ]
            PerformFind []

            (script step options for Insert Calculated Result => I selected 'select entire contents', I selected go to target field: DateSales)

           However, when I want to execute the script, I only get some data in the field of 'DateSales' and an error message, but not a list of records, that only displays the records of this week.
       Thank you for your help! I hope I exlained myself...