Discussion:
bitmapfilter
(too old to reply)
Ken Mayer [dBVIPS]
2008-10-25 04:14:21 UTC
Permalink
Is there a way to tell if the bardataedit1.bitmapfilter button is actively filtering a table from a form? I would like to place a notice on a form that the table is being filtered, but I can't find a way to tell if the filter is active or has been cleared, other than knowing that I just set or cleared the filter.
if form.rowset.filter # null
// the filter property of the rowset will have something in it if
// there is a filter in action.
// Also, you could check the rowset's STATE property: if it is 4,
// then the rowset is being filtered.
endif

Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Charles
2008-10-26 19:17:03 UTC
Permalink
Post by Ken Mayer [dBVIPS]
Is there a way to tell if the bardataedit1.bitmapfilter button is actively filtering a table from a form? I would like to place a notice on a form that the table is being filtered, but I can't find a way to tell if the filter is active or has been cleared, other than knowing that I just set or cleared the filter.
if form.rowset.filter # null
// the filter property of the rowset will have something in it if
// there is a filter in action.
// Also, you could check the rowset's STATE property: if it is 4,
// then the rowset is being filtered.
endif
Ken
Ken,

Thank you.

Charles
Charles
2008-10-27 15:26:47 UTC
Permalink
Post by Ken Mayer [dBVIPS]
Is there a way to tell if the bardataedit1.bitmapfilter button is actively filtering a table from a form? I would like to place a notice on a form that the table is being filtered, but I can't find a way to tell if the filter is active or has been cleared, other than knowing that I just set or cleared the filter.
if form.rowset.filter # null
// the filter property of the rowset will have something in it if
// there is a filter in action.
// Also, you could check the rowset's STATE property: if it is 4,
// then the rowset is being filtered.
endif
Ken
Ken,
With your suggestion I can detect when the filter is turned on to display my "Active Filter" notice, but when I clear the filter by "filtering" a blank form, the filter is still on, and my "Actiive Filter" notice remains displayed. How can I make the rowset.filter = null after I clear the filter by running it on a blank form??

Charles
Geoff Wass [dBVIPS]
2008-10-28 05:07:14 UTC
Permalink
In article <***@news.alldbase.com>, ***@verizon.net
says...
Post by Charles
Post by Ken Mayer [dBVIPS]
Is there a way to tell if the bardataedit1.bitmapfilter button is actively filtering a table from a form? I would like to place a notice on a form that the table is being filtered, but I can't find a way to tell if the
filter is active or has been cleared, other than knowing that I just set or cleared the filter.
Post by Charles
Post by Ken Mayer [dBVIPS]
if form.rowset.filter # null
// the filter property of the rowset will have something in it if
// there is a filter in action.
// Also, you could check the rowset's STATE property: if it is 4,
// then the rowset is being filtered.
endif
Ken
Ken,
With your suggestion I can detect when the filter is turned on to display my "Active Filter" notice, but when I clear the filter by "filtering" a blank form, the filter is still on, and my "Actiive Filter" notice remains
displayed. How can I make the rowset.filter = null after I clear the filter by running it on a blank form??
Post by Charles
Charles
Charles,

Maybe you can change

if form.rowset.filter # null

to

if empty( form.rowset.filter )

It is an untested idea.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Ken Mayer [dBVIPS]
2008-10-28 05:19:03 UTC
Permalink
Post by Charles
Post by Ken Mayer [dBVIPS]
Is there a way to tell if the bardataedit1.bitmapfilter button is actively filtering a table from a form? I would like to place a notice on a form that the table is being filtered, but I can't find a way to tell if the filter is active or has been cleared, other than knowing that I just set or cleared the filter.
if form.rowset.filter # null
// the filter property of the rowset will have something in it if
// there is a filter in action.
// Also, you could check the rowset's STATE property: if it is 4,
// then the rowset is being filtered.
endif
Ken
Ken,
With your suggestion I can detect when the filter is turned on to display my "Active Filter" notice, but when I clear the filter by "filtering" a blank form, the filter is still on, and my "Actiive Filter" notice remains displayed. How can I make the rowset.filter = null after I clear the filter by running it on a blank form??
rowset.clearFilter()

Or:

rowset.filter := null

clearFilter may just put a blank string there, so it wouldn't evaluate
to null.

You may be better relying on the rowset's state property.

Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
http://www.goldenstag.net/dbase
Loading...