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

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

Recommended Posts

Posted

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

Posted

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

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

Posted

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.

Posted

Yep - just dusted off an old copy of the 4.1 manual and the "Paste Result" script step is what you're looking for. From v 5.0 onwards, this has been replaced by the "Insert Calculated Result" script step.

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