This method behaves a bit strange. When I run a filter on application launch it's applied throughout the whole application successfully (except when I call a query to fill a dynamic value list).
Then at runtime I apply another filter to choose, for example, employees with names starting with 'w'. The filter is applied successfully.
And here is where the weird things happen. I open my search screen and search for employees with names starting with 'g'.
1. First of all, the 'g' employees are loaded in the search screen which is what I want but what I would not expect with my 'w' filter applied. The search is made by query (databaseManager.getDatasetByQuery()) and loaded in a form that uses a separate foundset.
The further the more weird things.
2. After I search for 'g' employees I select one of them for viewing and append this record to the foundset of my first screen that has that 'w' filter applied (I append it by getting the foundset's query, getting the dataset of the PKs with the help of this query and adding a row with the selected 'g' employee PK to it, then loading the resulting dataset in the form). And I still can see the 'w' employees together with the selected 'g' employee/ Why did the 'w' filter not exclude the 'g' employee from the list?
This behavior is exactly (well, with minor imperfections) what I want to implement but I don't understand why the filter works so strange.
(If I go to search again after selecting one 'g' employee and appending it to the 'w' list, and select another employee, say, 'r' employee, then the 'g' employee disappears from the list but the 'r' employee is still there. I would like to keep both of them and be able to add more).
Any ideas on what is going on behind the screen are most welcome.
3. And a bit of a conceptual question: is the method addTableFilterParam() supposed to be used on start up only or is it just another method to be played with at any place in the application. We are dealing with filters that the users are able to create, store and remove whenever they like. Is this method the best way to work with filters for us?
Cheers,
Maria