Remote Find Questions

Wouter wouter.abraham at pi.be
Sat Mar 27 13:04:15 EST 2004


On 27 Mar 2004, at 18:00, use-revolution-request at lists.runrev.com wrote:

> Message: 5
> Date: Sat, 27 Mar 2004 07:00:05 -0700
> From: Rob Cozens <rcozens at pon.net>
>
> Wouter,
>
> I will look further into marking cards; but the real issue for me is
> the ability to start the search or marking process at a specific card
> and stop searching/marking after reaching another specific card.
> Here's why:
>
> Unlike dBase or older versions of Filemaker, SDB databases support
> multiple record types in a single file.  I might have a database with
> 1,000 customer records, 10,000 invoice records, 10,000 payment
> records, 50,000 inventory part records, 50,000 part issue records,
> 200 chart of account records, and 200 ledger records.  If I am
> searching for one or more ledger records, I want the search to start
> at the first ledger record and end as soon as possible after the
> 200th ledger record...I don't want to search the 121,200 records that
> are not ledger records.  [Of course, if there is only one hit in the
> db regardless of record type, the entire stack will be searched once
> plus the ordinal of the card where the search started.]
>
> Unless someone can offer a better way to do this, I will look to see
> if the issue has been addressed in Bugzilla.  If not, I will propose
> an enhancement to the find command to (a) support startingCard &
> endingCard parameters and (b) application of find to any stack
> instead of just the defaultStack.
> -- 
>
> Rob Cozens
> CCW, Serendipity Software Company
> http://www.oenolog.net/who.htm
>


I see now what you mean by "fleshing out" :-)

Is this more according to your idea?

function findspecial stack2search,startCd,endCd,targetText,fldName
   put the cardids of stack stack2search into tCdIDs
   if startCd = "" then put 1 into startCd
   if startCd is a number then
     if endCd = "" then put the number of lines of tCdIDs into endCd
     if endCd is a number then
       put line startcd to endCd of tCdIDs into tCdIDs
       replace "card id " with "" in tCdIDs
       repeat for each line i in tCdIDs
         if targetText is in fld fldName of cd id i of stack 
stack2search then put i & cr after tCollector
       end repeat
       if tCollector = "" then
         put "not found" into tCollector
       end if
     else put "invalid parameter" into tCollector
   else put "invalid parameter" into tCollector
   return tCollector
end findspecial

Nevertheless if possible can you run the first handler 1 time "timed"?  
I'd really like to know how long it takes for that amount of records 
(as I don't have such a huge database to run tests on).

Tnx,
WA



More information about the use-livecode mailing list