TableFilters Reload

Discuss all feature requests you have for a new Servoy versions here. Make sure to be clear about what you want, provide an example and indicate how important the feature is for you

TableFilters Reload

Postby bubba » Mon Jul 31, 2006 4:03 pm

I would like to have a way to reset a Table filter without having to log into and out of the program. Or alternatively, a way to perform a login and logout proceduraly without exiting the main program.

Would also appreciate documentation on exactly how the table filters work and when they take effect.

Regards,
Lee Snover
bubba
 
Posts: 227
Joined: Thu Aug 19, 2004 5:42 pm
Location: Bath, PA

Postby patrick » Mon Jul 31, 2006 4:11 pm

Currently, you can't remove a filter once it is set.

When you set a table filter, the criteria that you passed will be automatically added to every query that Servoy fires against the table. So if you set a filter like 'city=london' and you manually search for a city called 'birmingham', the query will look like

'SELECT address_id FROM addresses WHERE city = 'birmingham' and city = 'london'

The last part is added by Servoy. The results of this query will be 0 of course and that's exactly what you wanted when you specified the filter.

Hope this helps.
Patrick Ruhsert
Servoy DACH
patrick
 
Posts: 3703
Joined: Wed Jun 11, 2003 10:33 am
Location: Munich, Germany

Postby bubba » Mon Jul 31, 2006 4:21 pm

patrick wrote:Currently, you can't remove a filter once it is set.

When you set a table filter, the criteria that you passed will be automatically added to every query that Servoy fires against the table. So if you set a filter like 'city=london' and you manually search for a city called 'birmingham', the query will look like

'SELECT address_id FROM addresses WHERE city = 'birmingham' and city = 'london'

The last part is added by Servoy. The results of this query will be 0 of course and that's exactly what you wanted when you specified the filter.

Hope this helps.


Exactly, and that's the problem. I want to use the TableFilter to do record level security and some users I need to be able to change that security while they are in the program. I don't want to have to make them exit and restart the program.

Thanks,
Lee
bubba
 
Posts: 227
Joined: Thu Aug 19, 2004 5:42 pm
Location: Bath, PA

Postby ROCLASI » Mon Jul 31, 2006 5:12 pm

Hi Lee,

At the moment you can't remove tablefilters (nor foundset filters) once they are set.
If you really need more dynamic filtering then you need to handle all the queries yourself. A bit of a pain, but doable.

I would suggest you add your feature request to the bugbase as well (as a feature request ofcourse) so it won't be lost in the sea of forum messages.

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

Postby bubba » Mon Jul 31, 2006 5:21 pm

Robert:

Thanks.

I understand I can do this myself, but that defeats the purpose of using a 4GL. This functionality exists and works well in Filemaker, and actually in Oracle itself as that is our primary DB. However, to use it in Oracle requires specific Oracle user logons, which is prevented by how Servoy interfaces with the database.

It seems like this would be a relatively trivial feature to add, and would save much work and aggravation for developers.

Regards
Lee
bubba
 
Posts: 227
Joined: Thu Aug 19, 2004 5:42 pm
Location: Bath, PA

Postby JDW » Mon Aug 27, 2007 10:17 pm

Agreed. removeTableFilterParam and removedFoundsetFilterParam would both be very useful.

Since they would be accessible only by the programmer developing the application seems these additions would be of limited security risk for those using filters to hide data.

Related post: http://forum.servoy.com/viewtopic.php?t=2345

JW
JDW
 
Posts: 71
Joined: Sun Feb 01, 2004 1:50 am

Postby martinh » Mon Sep 10, 2007 10:52 am

As I understood the table filters can not be removed while you are logged on. But for foundset filters I agree. I already faced the same situation where I needed to remove the foundset filter, because I wanted to do a reload based on a new filter, but unfortunately my new filter was concatenated with the existing filter.

I can imagine that the new foundset filter will only be active when you do a new loadRecords(). As far as I can see, this will be good enough for me.
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Postby rgansevles » Tue Sep 11, 2007 8:33 am

All,

A new method removeTableFilterParam is planned for Servoy 4.
Unfortunately, we cannot implement this in 3.5 easily.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Postby martinh » Tue Sep 11, 2007 8:54 am

Including also removedFoundsetFilterParam ?
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Postby olivier melet » Tue Sep 11, 2007 10:09 am

rgansevles wrote:A new method removeTableFilterParam is planned for Servoy 4.


Great! We thought it would never happens (first request for such a feature in 2004 if I remember well!).

Thank you servoy!
Olivier Melet
Administration et projets
InfoForm SA
olivier melet
 
Posts: 183
Joined: Mon Apr 19, 2004 3:33 pm
Location: Switzerland

Postby rgansevles » Wed Sep 12, 2007 8:53 am

martinh wrote:Including also removedFoundsetFilterParam ?

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

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

TableFilters should work on INSERT statements

Postby martinh » Tue Sep 18, 2007 3:23 pm

TableFilters are very useful. For example in my case where in my database I have records for several companies/administrations in one single database.

By login into a company I set the tablefilter and only the records for that company are selected. Great .... but ....

This tablefilter is not working on INSERT statements. So I have to program in each form now that my company_id must be filled with the company_id of the company where I logged in.

It would be very logic that if there is a tablefilter on a certain table, that the tablefilter is also used on INSERT statements.

The best way to do this, seems to me that when a newRecord() method is triggered on a form(so on a foundset) that the value from the table filter will be filled into the foundset. In that case you have the possibility as a programmer still to change this value.
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Postby pbakker » Tue Sep 18, 2007 3:35 pm

That will not work, because a TableFilter is capable of filtering on multiple values (using the In operator). What should be inserted then?

You should do this with the auto enter options available in the dataprovider dialog.

For example, you can do a lookup from a global variable which would contain the owner_id/company_id of the user that is logged in.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands


Return to Discuss Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests