Home > Archive > Programming with dBASE > November 2005 > Filters or Index??









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Filters or Index??
Steve Hawkins

2005-11-04, 3:23 am

I'm working with a rowset from a single table in which I review
entries every couple days. I have a checkbox on the form that allows
me to tag a record as "archived" (logical field) after I am done
reviewing it.

I want to bring up a form that has only the unarchived (archived =
false). I tried setting an index to display the unarchived records.
This works fine except.... when I tag a record as archived, it
obviously no longer displays on the grid due to the index that is
active. This also causes the grid display to go bonkers (row
highlight bounces around, blank lines on the grid, etc).

Is there a way to accomplish what I want using the index, or am I
better off just using a filter? Would a filter be fast enough? It's
not a real large table (maybe a couple thousand records).

Thanks for your input.
Michael Nuwer [dBVIPS]

2005-11-04, 7:23 am

Steve Hawkins wrote:
>
> Is there a way to accomplish what I want using the index,


Hi Steve,

I have dealt with this issues by using a second field to display and
edit while the index is set on the original field. This way I have full
control over updating the original field (and thereby the display).

or am I
> better off just using a filter?


Filters have similar issues as setting a index range. I find that my
users get confused when records vanish from a form. I always give then
an option to "show all" records or set the filter. They seem to like
that option.

> Would a filter be fast enough?


A filter will be fast enough if (a) the field used in the filter
criteria has an index; and (b) the rowset has _no_ active index
(.indexname="") when the filter is active.

> It's
> not a real large table (maybe a couple thousand records).


Zagrijs Venter

2005-11-08, 9:24 am

Hi Steve

I don't know whether the VIPS would agree with my approach. I would use a
character field, rather than logical field, with two different characters
for tagged and not tagged, and a "WHERE" clause in the querie's sql.

Zagrijs Venter


"Steve Hawkins" wrote

> I'm working with a rowset from a single table in which I review
> entries every couple days. I have a checkbox on the form that allows
> me to tag a record as "archived" (logical field) after I am done
> reviewing it.
>
> I want to bring up a form that has only the unarchived (archived =
> false). I tried setting an index to display the unarchived records.
> This works fine except.... when I tag a record as archived, it
> obviously no longer displays on the grid due to the index that is
> active. This also causes the grid display to go bonkers (row
> highlight bounces around, blank lines on the grid, etc).
>
> Is there a way to accomplish what I want using the index, or am I
> better off just using a filter? Would a filter be fast enough? It's
> not a real large table (maybe a couple thousand records).
>
> Thanks for your input.



Steve Hawkins

2005-11-09, 3:23 am

Thanks for the suggestion Zagrijs. I'll give that some thought as
well.

Zagrijs Venter said...
> I don't know whether the VIPS would agree with my approach. I would use a
> character field, rather than logical field, with two different characters
> for tagged and not tagged, and a "WHERE" clause in the querie's sql.

Steve Hawkins

2005-11-09, 3:23 am

Michael:
Thanks for the suggestion. I'll give that a shot. I agree with you
that having records disappear is quite disorienting <g>. Can give one
the impression that it got deleted.

Michael Nuwer [dBVIPS] said...
> I have dealt with this issues by using a second field to display and
> edit while the index is set on the original field. This way I have full
> control over updating the original field (and thereby the display).

Zagrijs Venter

2005-11-09, 9:23 am

You are welcome!

"Steve Hawkins" wrote
[color=darkred]
> Thanks for the suggestion Zagrijs. I'll give that some thought as
> well.
>
> Zagrijs Venter said...


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com