Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8661 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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.

Posted

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

This topic is 8661 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.