I have a textbook header/detail form, in other words:
- A main form with customer information at the top.
- A tabpanel on the main form below containing another form, which has a TableView for transactions.
- A relation so that the transactions displayed are for the customer being viewed.
Which all works fine. I also added a checkbox so that I could toggle the display of transactions with zero balances. Here’s the code (The checkbox is bound to the form variable ‘outstandingOnly’).
function filterCheckBox_onDataChange(oldValue, newValue, event)
{
var success = false;
if (outstandingOnly == true)
{
success = databaseManager.addTableFilterParam('testdb', trans', 'st_trbal', '!=', 0, 'balancefilter');
}
else
{
success = databaseManager.removeTableFilterParam(testdb', 'balancefilter');
}
if (!success)
{
application.output('Adding table filter operation failed');
}
forms.CustomerTransactions.foundset.loadRecords();
return true;
}
That fires and adds/removes the filter as intended, however the displayed records in the TableView never change.