- Code: Select all
var vServerName = controller.getServerName();
if (vFilterFrom)
{
databaseManager.addTableFilterParam(vServerName, 'invoices', 'date_of_service', '>', vFilterFrom, 'invoiceFilterFrom')
}
if (vFilterTo)
{
databaseManager.addTableFilterParam(vServerName, 'invoices', 'date_of_service', '<', vFilterTo, 'invoiceFilterTo')
}
It works fine if I only need to set one or other of the dates, but when I try to set both the second addTableFilterParam removes the first.
(I've tried using the same as well as different filter_name parameters)
Is there any way to filter a table on a range of dates?