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

Setting date parameters in a Find Script


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

Recommended Posts

I am trying to use a script to find client records that have a calculated date (LastService) LESS THAN a date value stored in a global field (NextDate). The LastService field is an unstored calculated field that returns the latest date on record in the Services table that is linked to the active client. The date in the global field is set by another script, which then calls this script, so the global field can change.

What I have done is:

Enter Find Mode[]

Set Field ("LastService", ""<" & NextDate")

...

What Filemaker puts in the LastService field is just the date, and I can't figure out what special incantation I need to use to get it to work right. Ideas???

Thanks,

David

Link to comment
Share on other sites

You can't use Set Field [] here. Instead use:

Insert Calculated Result [ LastService, " < " & DateToText (NextDate)]

Link to comment
Share on other sites

Well, I've looked for the "Insert Calculated Result" script step--is this post-4.1? Because it doesn't appear anywhere in my copy of 4.1.

I worked an ugly hack by creating a calculated field that performs the test and returns a 0 or 1, which I can then test in my script.

Link to comment
Share on other sites

This topic is 8196 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.