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.

Reply via email to