Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Get Filter from a datawindow

1,106 views
Skip to first unread message

Jas

unread,
Nov 19, 2004, 3:42:10 PM11/19/04
to
If anyone has the script to get the current filter from a datawindow and
format it so it can be re-applied to the datawindow could you please send it
to me.

Thank you so much!!

- Jas


Julián Tagarro

unread,
Nov 19, 2004, 3:45:36 PM11/19/04
to
Hi all

ls_filter = <DW Control Name>.Object.DataWindow.Table.Filter

Regards
Julián

"Jas" <jso...@comcast.net> wrote in message news:419e5aa2$1@forums-1-dub...

Jas

unread,
Nov 19, 2004, 4:09:09 PM11/19/04
to
Julian,

Get the filter from the datawindow is straight forward. Unfortunately, you
cannot apply it back in the format in ls_filter.

I'm looking for the script to format ls_filter below so I can use the
SetFilter function to apply the same filter to another datawindow.

Thanks - Jas

"Julián Tagarro" <j-ta...@uolsinectis.com.ar> wrote in message
news:419e5b70$1@forums-1-dub...

Doug Porter

unread,
Nov 19, 2004, 6:27:01 PM11/19/04
to
The filter string that is returned from that call should work just fine with
SetFilter(ls_filter), Filter(). If there is no filter already, it will
return "?".

You could also try the alternate syntax:
ls_filter = <DW Control Name>.describe("DataWindow.Table.Filter")

What does the filter that is being returned look like in your situation and
what return codes are you getting on the SetFilter() and Filter() calls?

Doug Porter
DailyAccess Corporation

"Jas" <jso...@comcast.net> wrote in message news:419e60f5$1@forums-1-dub...

Jas

unread,
Nov 23, 2004, 10:54:48 AM11/23/04
to
Using ls_filter = <DW Control Name>.describe("DataWindow.Table.Filter")

For example, ls_filter has the value : (#1 = ~"Smith~") and (#8 >= 1)

When using SetFilter(ls_filter), a message box pops with the message
Datawindow:Expression is not valid
Also, the return code for SetFilter is -1

"Doug Porter" <doug_porterATdailyaccessDOTnospamDOTcom> wrote in message
news:419e8145$1@forums-1-dub...

Doug Porter

unread,
Nov 23, 2004, 4:21:56 PM11/23/04
to
Looks like the ~" characters are probably getting you. You could do a
replacement on the string changing the ~" characters into single quotes and
that should do it.

You can also take whatever filter string you get and try it out in the
datawindow painter and it will tell you if it thinks it is a valid filter
expression

Doug Porter
DailyAccess Corporation

"Jas" <jso...@comcast.net> wrote in message news:41a35d48$2@forums-1-dub...

0 new messages