We seem to be going in circles here.
Take a look at the sample files for Date Ranges at Database Pros,
start with this one:
http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-FIND=+&resource_id=DBPros000048
Lee
On Jul 6, 2008, at 8:49 AM, Nicholas Geti wrote:
Your example below, "Insert Calculated Result", did not work
either. I had tried it when it was first suggested. As I asked last
time, is a Calculated variable the same as a Global?
I had thought to upgrade to FMP Version 8 but there were lots of
hitches which I suspect amount to lots of hours to fix so I put it
off until I get some breathing space in my schedule.
----- Original Message ----- From: "Steve Cassidy" <[EMAIL PROTECTED]
>
To: <[email protected]>
Sent: Sunday, July 06, 2008 4:26 AM
Subject: Re: Cannot enter date field for FIND from script
On 6 Jul 2008, at 07:32, Nicholas Geti wrote:
Now, if you have basically kept with this script, it will not
work. As someone else pointed out, all fields except globals
will be empty in Find mode. The Copy step needs to come before
entering find mode, otherwise it will copy an empty field.
That was the first thing I did and people suggested SET Field was
better.
If you look back through the thread, you will see that I and others
talked about "Set Field". My comment was:
IIRC in FMP5/6 it was not possible to Set a date field with
anything except a proper date -- even in Find mode. So you cannot
use Set Field in a script in order to set up a find on a date
range. Instead, you have to use the Paste Result command -- or
was it called something else in FMP5/6? It was a long time ago...
In fact, in FMP5, the script step to use is called "Insert
Calculated Result" not "Paste Result". (Somewhere along the line it
was changed by Filemaker Inc.)
With Set Field, you can set a date field only to a date, even in
Find mode. This might be considered crazy -- I think it is -- but
that's the way things were with FMP5/6. So, you have to use
Insert Calculated Result, and that means the field you are
inserting into has to be on the current layout.
Manual pasting works just fine. So what else do you suggest?
Nothing other than the above. Like this (modifying your original
script):
Go to Layout ("Inventory Control Records") [This layout must
include the field Actual Invoice Date]
Enter Find Mode (Restore)
Insert Calculated Result ("Actual Invoice Date"; Combined Dates
for Find)
(Combined Dates for Find must be a global field. The range
operator must consist of three periods: "...")
Note that by choosing to restore a stored find, you will find for
any stored criteria plus your date range. You may or may not want
this.
You are using older software. Details are getting a little hazy
(for me and probably for most others). It is perhaps not
surprising that some of us are forgetting some of its intricacies
and idiosyncracies...
Steve