March 7, 200124 yr I am trying to find a range of dates automatically in a script. When I execute the script I get a question mark in the date, and a statement that no records match the request. The script reads: . . Enter Find Mode [] Set field ["date","Date(Month(Today),Day(Today-5),Year(Today))..Date(Month(Today),Day(Today),Year(Today))"] Perform Find [] How do I go about scripting this to find the last five days?
March 8, 200124 yr You were on the right track. The only problem is that you can't use Set Field when you have a date range. You have to use Insert Calculated Result instead. It's a Filemaker quirk. Use this: Insert Calculated Result [date, DateToText(Status(CurrentDate)-5)&"..."&DateToText(Status(CurrentDate))] Status(CurrentDate) is better than the Today function, because the Today function doesn't update if you leave Filemaker running past midnight, while Status(CurrentDate) is always correct.
March 8, 200124 yr Hey Doug, I remeber seeing some tip files on the web about performing finds using a date range. Go to www.databasepros.com and check out the resources. Search on the word date and it will bring up some tip files related to dates and date ranges. Good Luck. Steven B
Create an account or sign in to comment