Mime-Version: |
1.0 (Apple Message framework v936) |
Content-Type: |
text/plain; charset=US-ASCII; format=flowed; delsp=yes |
Date: |
Wed, 9 Jun 2010 20:41:33 +0100 |
Reply-To: |
|
Subject: |
|
From: |
|
In-Reply-To: |
<5CC81E744FEC4D98AE4755823FFBD0A0@dual> |
Content-Transfer-Encoding: |
7bit |
Sender: |
|
Parts/Attachments: |
|
|
Nicholas
Yes, you've discovered one of the oddities in Filemaker pre .fp7. But
this is documented in the user manual and the help.
Filemaker expects a date in a date field, even in Find mode. Doesn't
really make sense, but there you go.
The workaround is to use a script step called something like Insert
Calculated Result or Paste Result (sorry, I only have a Japanese
version handy so I can't check this easily). The name changed at some
point in the version history.
The point about this step is that the field has to be on the current
layout. So it is not as useful as Set Field. But it will allow you to
do what you want.
Steve
PS Incidentally, I think you have your start and end dates the wrong
way round. The first date must be earlier than the second one.
On Jun 9, 2010, at 8:17 PM, Nicholas Geti wrote:
> I am using FMP V5.5
>
> The statement:
> Set Field["ActiveInvoiceDate","DateToText (Start Date) & "..." &
> DateToText (End Date)"]
>
> It generates the string "4/3/0855". I added the Start Date and End
> Date variables to the layout so I can see that the values have been
> set up correctly. They contain the correct dates: 3/1/2020 and
> 3/6/2010 respectively. This used to work but I have no idea why it
> is stuck on the same strange output value for date. If I manually
> type the range, I get the correct Find records.
>
> I am testing the script containing this line by executing it from
> the toolbar so that there is no interference from other scripts.
>
> Some tests:
> 1. Within the script set "Start Date" and "End Date" to Today. This
> gives "8/29/1895" in the ActiveInvoiceDate filter field.
>
> 2. Remove the "End Date" parameter.
> Set Field["ActiveInvoiceDate","DateToText (Today)"] This also
> gives "8/29/1895"
>
> 3. Remove the DateToText function and remove the "End Date" parameter.
> Set Field["ActiveInvoiceDate","Today"]
> This gives "6/9/2010" but I get the same found records as in the
> other cases.
>
> 5. Not using the DateToText function;
> Set Field["ActiveInvoiceDate",""Start Date" &"..."& End Date")
> gives "6/9/2010"
> Start Date=Today
> End Date = Today
> The second half of the range has been dropped off.
>
> 4. Manually typing the range works.
|
|
|