cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with 12.6 and SetFilter corrupting describe("datawindow.table.filter")?

Former Member
0 Kudos

I have a datawindow control in one window, that is ShareData'd to a datastore in another window

Under some set of circumstances that I have not been able to reproduce in a tiny environment, a call to setfilter corrupts the current filter on the datastore. eventually, I try to use what was the current filter, and get a datawindow expression not valid error.

The sequence is something like this ...

PowerBuilder 12.6, build 4035

classic

(IDE or runtime)

window a:

has a datawindow control

with a dataobject

setTrans

retrieve

window b:

datastore (as an instance variable)

datastore is created, dataObject is set to the same one as window A's datawindow

Sharedata

One can look at the current filter for a datawindow/datastore by using describe("datawindow.table.filter")

after a call to setFilter in window B... the data from describe("datawindow.table.filter") is a string of unprintable characters.

Eventually, when I try to restore the previous filter, this causes a Datawindow expression not valid error.

I happened to notice that in this case, the filter string I was passing to SetFilter happened to be the current filter string.

If I test for such things, (and do not perform the setFilter when there is no change being made) the error is (so far) avoided.

But I don't feel I should have to do this test.

I've looked (and looked) for anyone else discussing something like this, but the closest matches had to do with bad syntax in the filter expression. In my case the expression is just fine (well, the one I pass to the setFilter). The expression reported by Describe is bad (and certainly NOT what I just set the filter to be.)

For what it's worth, the expression I am setting in this case is:

record_status = 'ACTIVE'

I put the datawindow in a tiny simple window, used the same data object, retrieved with the same arguments, used the same filter. Unfortunately ... no errors. It only errors in the midst of a lot of other code. My attempts at reproducing the gist of that code in condensed form have not been successful in reproducing the error in the small space.

I've tried intercepting the datastore just before the offending setfilter, using getFullState/setFullState to copy things to the debugging window. But .. in the debugging window, the setFilter still does not cause a problem. sigh.

Any ideas?

And/or, tips on how this post should have been done? (first post I've made)

And/or ... how does one report an issue for 12.6? (Assuming someone does not recognize this as a known issue.)

Mike

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Update:

I'm trying the approach of using setFilter("") immediately before setfilter(whatever_I_wanted_as_a_filter)

(I implemented this by overloading SetFilter in an ancestor class for my datawindow controls ... to avoid having to touch every call to SetFilter).

It may or may not be reducing the frequency of the problem. As I was writing this ... I got another bug report from a tester.

Sigh ...