Perform Find in Script

  • Follow


Hi

How can I optimize this Perform Find in a Script:

Find Record Database::Date [= //]

It returns all records, which Date lays on Todays Date (//).

However how can I change it, so that it returns all records between Todays 
Date and 7 days before Todays Date?

Thanks

Daniel


0
Reply D 7/6/2005 2:18:49 PM

On Wed, 6 Jul 2005 16:18:49 +0200, D wrote:
>  Hi
> 
>  How can I optimize this Perform Find in a Script:
> 
>  Find Record Database::Date [= //]
> 
>  It returns all records, which Date lays on Todays Date (//).
> 
>  However how can I change it, so that it returns all records between Todays 
>  Date and 7 days before Todays Date?


enter find mode
setfield Database::Date ( get(currentdate)-7 & ".." & get(currentdate))
perform find

(maybe it's not setfield, but paste result - one of both requires result
type date, while the other may return any text)


0
Reply Martin 7/6/2005 2:28:39 PM


In article <slrndcnqkn.4j8.t-use@ID-685.user.individual.de>, Martin
Trautmann <t-use@gmx.net> wrote:

> On Wed, 6 Jul 2005 16:18:49 +0200, D wrote:
> >  Hi
> > 
> >  How can I optimize this Perform Find in a Script:
> > 
> >  Find Record Database::Date [= //]
> > 
> >  It returns all records, which Date lays on Todays Date (//).
> > 
> >  However how can I change it, so that it returns all records between Todays 
> >  Date and 7 days before Todays Date?
> 
> enter find mode
> setfield Database::Date ( get(currentdate)-7 & ".." & get(currentdate))
> perform find
> 
> (maybe it's not setfield, but paste result - one of both requires result
> type date, while the other may return any text)

Unless it's been fixed in FileMaker 7 (FINALLY!), there's a bug in the
Set Field command which means you can't use it with dates or times that
require anything other than a single date. Instead you have to use the
Insert Calculated Result (or whatever FileMaker 7 calls it).

    Insert Calculated Result [DateField, 
                              Status(CurrentDate) - 7 & "..." & 
                                         Status(CurrentDate)]

"Status(CurrentDate)" needs to be replaced with "Get(CurrentDate)" in
FileMaker 7.

The only problem is that the field DateField must be on the current
layout when the script is run.  :o\



Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
Reply Helpful 7/6/2005 9:04:00 PM

>    Insert Calculated Result [DateField,
>                              Status(CurrentDate) - 7 & "..." &
>                                         Status(CurrentDate)]
>
> "Status(CurrentDate)" needs to be replaced with "Get(CurrentDate)" in
> FileMaker 7.
>

Hi Harry

Thank you for your help!

It works perfectly.

/Daniel


0
Reply D 7/7/2005 6:23:48 AM

3 Replies
308 Views

(page loaded in 0.074 seconds)

Similiar Articles:













7/26/2012 3:19:21 PM


Reply: