Removing Foundset Filter Params

Questions, tips and tricks and techniques for scripting in Servoy

Removing Foundset Filter Params

Postby bobbydtma » Fri May 22, 2009 5:08 pm

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"
------------------------------------------
Bobby Drake
Software Engineer
TMA Systems, LLC
http://www.tmasystems.com
Servoy 5.2.1
DB: Oracle 10g, SQL Server 2005
OS: Vista 64
User avatar
bobbydtma
 
Posts: 20
Joined: Wed May 06, 2009 8:09 am
Location: Tulsa, OK, USA

Re: Removing Foundset Filter Params

Postby ROCLASI » Fri May 22, 2009 5:30 pm

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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Removing Foundset Filter Params

Postby bobbydtma » Fri May 22, 2009 5:37 pm

Thanks for the response, but I was referring to the addFoundSetFilterParam. :) Unfortunately for our situation, the addTableFilterParam would not be helpful.
------------------------------------------
Bobby Drake
Software Engineer
TMA Systems, LLC
http://www.tmasystems.com
Servoy 5.2.1
DB: Oracle 10g, SQL Server 2005
OS: Vista 64
User avatar
bobbydtma
 
Posts: 20
Joined: Wed May 06, 2009 8:09 am
Location: Tulsa, OK, USA

Re: Removing Foundset Filter Params

Postby ROCLASI » Fri May 22, 2009 6:04 pm

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 wrote:
martinh wrote: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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium


Return to Methods

Who is online

Users browsing this forum: No registered users and 36 guests