Re: FASTEST Record Find with FileMaker Pro 7?
Re: FASTEST Record Find with FileMaker Pro 7?
- Subject: Re: FASTEST Record Find with FileMaker Pro 7?
- From: Jason Bourque <email@hidden>
- Date: Fri, 11 Mar 2005 21:05:49 -0500
ALRIGHT the RESULTS are IN!!!!
Both scripts return the same results items 1 and 2 of below.
But script two is 48 times faster. (in Ticks)
{{"44", "118"}, {"44", "118"}, 4345, 89}
Script two was the search first then compose the list
Thanks for the great help. You have saved me hours.
Jason Bourque
tell application "FileMaker Developer"
tell database "Catalog Item Num Index.fp7"
set vWindowRef to a reference to window 1 of database "Catalog
Item Num Index.fp7"
tell vWindowRef
go to layout "Catalog Item Num Index"
show every record
try
delete every request
end try
set theRequest to create new request
end tell
tell theRequest
set cell "Text Box Field" to vItemNumToFind
end tell
find
tell vWindowRef
set vPagesFound to cell "Text Box Page Number" of records
end tell
end tell
end tell
return vPagesFound
On 3/9/05 10:38 AM, "Jake Pietrykowski" <email@hidden> wrote:
> Jason,
>
>> On 3/8/05 7:42 PM, "Jason Bourque" wrote:
>>
>> Hello,
>>
>> I have a script that uses a whose clause on a 10,000+ record database. Well
>> this isn't that fast. Is there a better way?
>>
>> tell application "FileMaker Developer"
>> tell database "Catalog Item Num Index.fp7"
>>
>> tell table "Text Box Archive"
>> with timeout of 600000 seconds
>> try
>> set vPagesFound to cell "Text Box Page Number" of
>> (every record whose cell "Text Box Field"'s cellValue contains
>> vItemNumToFind)
>> get vPagesFound
>> on error
>> set vPagesFound to {}
>> end try
>> end timeout
>> end tell
>>
>> end tell
>> end tell
>
> Sure...try this out. Instead of forcing FileMaker to 'search' AND 'compose'
> a list, rather search first, then compose a list of the results.
>
> --code
>
> tell application "FileMaker Developer"
> tell database "Catalog Item Num Index.fp7"
> show every record
> delete every request
> set theRequest to create new request
> set cell "Text Box Field" of theRequest to vItemNumToFind
> find
>
> set vPagesFound to cell "Text Box Page Number" of records of current layout
> end tell
> end tell
>
> --/code
>
> This should be faster...Please post or let me know what you find!!!
>
> Cheers,
> Jake
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden