Here's a basic script that should work:
Set Variable [ $_date_range ; Value: (Get ( CurrentDate ) - 7 ) & "..." & ( Get ( CurrentDate ) - 2 ) ]
Perform Find [Restore]
The Perform Find step should be set to do a Find on your date field with the criteria set to $_date_range.
Thank you for your reply. I've entered the first line "Set Variable" - so far, so good.
The "Perform Find" though, I don't know how to set the criteria to "$_date_range" - it just won't accept that. What exactly do I have to do there?
1. Open your script
2. Create a new Perform Find step
3. Double-click the Perform Find step to open the "Specify Find Request" dialog box
3. Click the "New..." button to open the "Edit Find Request" dialog box
4. Select your date field in the "Find records when" section
5. Enter $_date_range (without any double-quote marks) in the "Criteria" section.
6. There's no need to add an operator so just ignore the "Insert Operator" button
7. Click OK to exit on the dialog boxes.
The script should then work!
Thank you, Nick - I tried it and in the "Specify Find Requests" box FileMaker will prevent me from saving what I've entered, saying: The value of this field must be a valid date in the range of years 1 to 4000 and should like "12/25/2003"
So I cannot save the "Perform Find" specifications. Any idea here?
Go to File menu > Manage > Database, double-click the relevant date field, then go to the Validation tab and UN-check the "Strict data type".