On Mon, 24 Jan 2000, Craig Spooner wrote:

> Hello everybody,
> 
> I'm also about to embark on a project that duplicates some of the 
> functionality of a FileMaker database.  I've already tacked together 
> a rough prototype of the project, but I thought I'd ask for some 
> ideas and suggestions before going too far.
> 
> The project, which is really a user interface to a large membership 
> directory, will contain approx. 4000 records.  I'll want to sort by 
> any of the 20-some-odd fields, as well as search for keywords in 
> those fields.  Finally, I'll want to print at least two different 
> types of reports of the data.
> 
> At present, I'm sorting the list in this way:
> 
>      sort lines of gText by item tWhichColumn of each
> 
> and I'm finding matches for keywords by using a repeat loop:
> 
>      repeat for each line i in tVar
>          if tSearchItem is in item tWhichColumn of i then
>              put x & cr after tAnotherVar
>          end if
>      end repeat
> 
> But I'm wondering if there's a better (faster?) way to do this. Would 
> an associative array be useful?  Is there a better way to do searches 
> through the data?  I know there's a matchText and matchChunk 
> function, but don't know if it's appropriate here.  I'd sure 
> appreciate any suggestions from those who have already been down this 
> road.

At 4000 records I don't think there's much of a worry doing it the way
you are.  4000 is probably too much to put each of the records on a
separate card, at least if you're going to use "find" to try to find
things.  But pretty much anything else (including reading from files)
would work.  If you want to optimize your searching you could use an
associative array or an associative array property, but you'd have to
rely on perfect matches rather than the fuzzier "is in" match you're
using above.  So the lookup would be done directly with:
put line (the kwIndex[tSearchItem] of me) of gText into tAnotherVar
  Regards,
    Scott

> Thanks very much,
> 
> Craig
> 
> /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
> \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
> 
> Craig Spooner
> Instructional Multimedia Specialist
> Office of Instructional Services
> Colorado State University
> (970) 491-2516
> 
> This is the MetaCard mailing list.
> Archives: http://www.mail-archive.com/metacard%40lists.best.com/
> Info: http://www.xworlds.com/metacard/mailinglist.htm
> 

********************************************************
Scott Raney  [EMAIL PROTECTED]  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...


This is the MetaCard mailing list.
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm

Reply via email to