It looks like the AddTableFilterParam() is not working when calling records with controller.loadRecords and a custom SQL.
We apply the addTableFilterParam() on solution start. On some forms we use the controller.loadRecords with a custom SQL like: controller.loadRecords(“SELECT a FROM b WHERE a=?”,[newValue]);
The filter is not applied on this custom SQL. U can see in the server log that it doesn’t add the filter parameter.
We are on Version: 5.2.8 - build 1016
I always thought this worked OK, but now I am not sure that I missed something while testing with sample data or that this problem arrised with one of the latest updates with Servoy.
Ok, i’ve made a sample solution of our situation. I was mistaken in where the problem occured. It isn’t the controller.loadRecords query, but actually a global method that fills a valuelist.
The query in the global method for getting valuelist values doesn’t get the filter. See attached sample solution, where the type_ahead field (used as a selector of records) shows all records without the filter.
You are using databaseManager.getDataSetByQuery() which is not controlled by table filters (as is the rawsql plugin).
Foundset loading is filtered, but these custom queries are executed as-is.