April 29, 200223 yr 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
April 29, 200223 yr You can't use Set Field [] here. Instead use: Insert Calculated Result [ LastService, " < " & DateToText (NextDate)]
April 29, 200223 yr Author 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.
April 30, 200223 yr Dredging up the memory here, but in 4.1 wasn't it "Paste Result" or something like that?
April 30, 200223 yr 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.
Create an account or sign in to comment