Paradox Community

Items in pnews.paradox-programming

Subject:Re: Fitler TableFrame Records
Date:Sun, 8 Mar 2020 09:53:12 -0400
From:"Steven Green" <greens@diamondsg.com>
Newsgroups:pnews.paradox-programming
> tc.setRange(field1_startvalue, field1_endvalue) ;//a range

not to change the subject, but..

be aware that if you feed it the same start and end value for a field, you 
don't just get that exact value.. it changes, and now acts like a pattern 
search

the result of tc.setrange(this, this) is the same as Ctrl-Z "this..", but 
they're filtered instead of having to Alt-Z scroll thru them

it's not documented, I never realized that until I was working on this big 
app I've been supporting for the last few years.. in their context, that is 
exactly how they use it

--

Steven Green
Myrtle Beach, South Carolina, USA

http://www.OasisTradingPost.com

Collectibles and Memorabilia
Vintage Lego Sets and Parts
- and Paradox support, too
"Peter"  wrote in message news:5e63f475$1@pnews.thedbcommunity.com...

Kevin,
If you have thousands of records it is definitely worth the time to get
the setrange working. I had made a kind of scheduling app for a customer
a long time ago and it used setGenFilter(). Within a few months they
started complaining that it seemed to be getting slower and slower. I
looked at it and it definitely was. I then redid it using setRange() and
now 10 years later it is still humming along without a blink.

The challenge about setrange() is using it for multiple fields. You need
to figure out the different sorts the user is going to want and build
the secondary indexes to match.

eg.1 - 1 field
tc.setRange(field1)  ;//an exact match like setgenFilter()
tc.setRange(field1_startvalue, field1_endvalue) ;//a range

eg.2 2 fields
tc.setRange(field1, field2_startvalue,field2_endValue
In this example field1 is an exact match, field2 can be a range

eg.3 3 fields
tc.setRange(field1, field2, field3_startvalue, field3_endvalue)
In this example fields 1 & 2 are exact matches, field3 is a range

tc.setRange(field1, field2, field3)  ;//exact matches on three fields
like setgenfFilter()

FWIW


On 3/7/2020 2:45 AM, Kevin Baker wrote:
> Tom-
>
> Thanks for the help.  I did try the setRange but for some reason, I can't 
> wrap my head around how to get it to work.  I've read setRange is faster 
> and I'll need fast, so I may go back and try and get setRange to work.
>
> Thanks for the help - Kevin 


Copyright © 2004 thedbcommunity.com