filtering data by user

Hello everybody

I have a form (tableview) with lots of combos in its header. Each combo has a valuelist. After selecting a different value by one of those, I am calling a function with sets filter to the foundset of the current form by using

foundset.addFoundSetFilterParam(...)

Each combo-filtering is using a different “filterName”, so I can easily remove with

foundset.removeFoundSetFilterParam(...)

before filtering by the name again.

Everything is fine!

In the “onHide”, a save all selected values from the combo-valuelists to reset them by starting my named form again. So, in the “onLoad”, I set all the form/global-variables (which are used as dataProviders in the combos) back to stored values and call the same function with is called by the “onDataChange” of a combo. I set a breakpoint inside the function and checked if it’s being called… yes it is an the filter is being set.

But, when the form is being totally loaded, all (unfiltered) data are shown!!!

I added a breakpoint to the “onShow” and checked the filter with

foundset.getFoundSetFilterParams()

and the correct “filterName” but the filter is gone!!! :?: :?: :?:

I restarted and checked it at the end of the “onLoad” like the same way and everything is fine, the filter is set! But in the “onShow” it’s gone again!!

So I have absolutly no idea what I’m doing wrong!

I hope you are able to help me!!

Thanks!

@Sanneke: You might remeber this form. It’s in the “cube_vtraktion”-modul and called “va_prekontakte_tbl”

Hi Ich,

The problem is that the framework will load a foundset on the form and that happens after the onLoad. That’s why it looses your filter.
What you could do, is check the property “empty foundset” on your program, then the framework will not do anything to your foundset. Keep in mind that you then will loose the foundset filters and sort that are set in the framework.

See image to know where to find the property:

[attachment=0]empty_foundset.png[/attachment]