Child pages
  • Using Table Filters

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
// Filter products within an array of product codes
var success = databaseManager.addTableFilterParam('crm', 'products', 'productcode', 'in', [120, 144, 200]);

// Filter orders using a subselect
var success = databaseManager.addTableFilterParam('crm', 'orders', 'countrycode', 'sql:in', 'select country code from countries where region = "Europe"')


Note

In Servoy 2020.03 we added support for sql-modifier . When value of the filter is a custom query, the operator used should be prefixed with "sql:" (like sql:in , sql:=, ...). This is a security feature, so a developer should explicitly mark a value as a select query. Currently, the operator works without the sql-modifier (the old way), but it will generate a warning in the log: "Filter is created using a custom query without using the sql-modifier, this will be removed in a future version of servoy, please use operator 'sql:in'". See issue 

Jira
serverServoy
serverId4ad951b9-f3a1-3d2a-96cd-12d1456d993c
keySVY-14682
 as we plan to enforce the modifier in future releases.

Example This example shows filters on null values

...