dbTalk Databases Forums  

Perform Find in Script

comp.databases.filemaker comp.databases.filemaker


Discuss Perform Find in Script in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
D
 
Posts: n/a

Default Perform Find in Script - 07-06-2005 , 09:18 AM






Hi

How can I optimize this Perform Find in a Script:

Find Record Database:ate [= //]

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



Reply With Quote
  #2  
Old   
Helpful Harry
 
Posts: n/a

Default Re: Perform Find in Script - 07-06-2005 , 04:04 PM






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

Quote:
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:ate [= //]

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:ate ( 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. \



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #3  
Old   
D
 
Posts: n/a

Default Re: Perform Find in Script - 07-07-2005 , 01:23 AM




Quote:
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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.