I have the following function on a form, that is a related to another form (Servoy Framework), to filter the foundset on the child form.:
function hideFinished( ) {
if ( foundset.getSize( ) > 0 ) {
foundset.addFoundSetFilterParam( 'ergebucht', '^||=', 0, 'hideFinished' );
foundset.loadAllRecords( );
}
}
It does not work. I get the the following error message.:
Cannot addFoundSetFilterParam to related foundset
I found that I can not add foundset filters to a related foundset.
https://www.servoy.com/forum/viewtopic.php?f=22&t=15153
https://www.servoy.com/forum/viewtopic.php?f=22&t=15567
My foundset is maybe filled by a related foundset or is a related foundset, but try to apply the filter directly on the forms foundset.
Why does it not work?
Hi Sebastian,
Related foundsets are governed by the relationship so if you want to filter on it you should manage that inside the relationship by using a global variable on the left side of the relationship. If this is not workable for you I suggest you use a table filter instead.
Of course a table filter will work an ALL foundsets that reference this table.
Hope this helps.
ROCLASI:
Related foundsets are governed by the relationship so if you want to filter on it you should manage that inside the relationship by using a global variable on the left side of the relationship. If this is not workable for you …
Hello Robert, thanks for your quick answer. I need the filter only on the form / view and the user should be able to switch between the filters. In what case that is not workable?
ROCLASI:
… I suggest you use a table filter instead.
Of course a table filter will work an ALL foundsets that reference this table.
This I can not use, because in other forms the table is also used and there it should not be filtered.