Removing Foundset Filter Params

How do you remove or check for foundset filter params? Each time we run a method that adds a filter param, the parameter is added to the end of the last SQL statement. When this additional parameter is added it slows the application down each time. From what we can see, the only way to remove these parameters is to close the session. We attempted to use the founset.clear() method with no success. Although in the Servoy Reference Guide under addFoundSetFilterParam it says “NOTE: As of Servoy 4.0, the addFoundSetFilterParam can be added and/or removed at any time.”

SQL 1st filter parameter:
=>databaseManager.getSQL(forms.__hr_tech_dtbl.foundset)
“select WK_PK from F_PERSONNEL where WK_PK in (select wkrc_wk_fk from f_personnel_rcs where wkrc_rc_fk IN (4,3) or wkrc_rc_fk is null group by wkrc_wk_fk) order by WK_ID_CODE asc”

SQL 2nd filter parameter:
=>databaseManager.getSQL(forms.__hr_tech_dtbl.foundset)
“select WK_PK from F_PERSONNEL where WK_PK in (select wkrc_wk_fk from f_personnel_rcs where wkrc_rc_fk IN (4,3) or wkrc_rc_fk is null group by wkrc_wk_fk) and WK_PK in (select wkrc_wk_fk from f_personnel_rcs where wkrc_rc_fk IN (4,3) or wkrc_rc_fk is null group by wkrc_wk_fk) order by WK_ID_CODE asc”

Hi Bobby,

Under the databaseManager node you’ll not only find the addTableFilterParam function but also the removeTableFilterParam function.
As you will see you can assign a name to a filter and use that name (with server) to remove it.

Hope this helps.

Thanks for the response, but I was referring to the addFoundSetFilterParam. :) Unfortunately for our situation, the addTableFilterParam would not be helpful.

Ah, I should have read better :oops:

Anyway, in the following thread the announcement is made of removeTableFilterParam and Rob Gansevles (from Servoy) states the following:

rgansevles:

martinh:
Including also removedFoundsetFilterParam ?

Probably not, the filter is used only during the lifetime of the foundset anyway.

Now I am not sure what he means with ‘lifetime of a foundset’. Maybe Rob can explain this a little further.