Ok,
After some investigation, it seems that I'm loading a foundset twice, but I can't find where. Here's the code used on startup, no other filter is applied later on, and the result shawn in the scrrenshot is strictly the table foundset ( no relation in tabpanel )
- Code: Select all
...some code before which will help :
- determine a premiminary dataset containing all entities directly connected to the user through a given relation
- set a first global table filter param...
..the result is stored in a variable
globals._app__aMy_entitesIDs=_myentities;
//then we apply another filter in order to get only any entity which are children from 'parent entities' connected to the user
//this will help extend the foundset to the children when we will apply the final filter
if (databaseManager.addTableFilterParam('my_db', null,'parent_ent_id','IN',globals._app__aMy_entitesIDs,'myglobfilterparent')==false){
//An error occured
catchloginerror(_errorcode);
}
else{
_filtered_entfs=databaseManager.getFoundSet('my_db', 'entites');
_filtered_entfs.loadAllRecords();
//at this stage, we get only those entities with a parent_id that is part of our previous filter
_all_entitiesdset= databaseManager.convertToDataSet(_filtered_entfs,['ent_id']);
_myentities_parent= _all_myentitiesdset.getColumnAsArray(1);
//now that we have the array of the children, we concanate it with the first array
globals._app__aMy_entitesIDs= globals._app__aMy_entitesIDs.concat(_myentities_parent);
databaseManager.removeTableFilterParam('my_db','myglobfilterparent');
}
...some other code with no interest
var _result = databaseManager.addTableFilterParam('my_db', null,'ent_id','IN',globals._app__aMy_entitesIDs,'myglobfilterent')
By killing the first filter and applying a new one, it seems that my first '_filtered_entfs' is not replaced as I thought it should be through the tablefilterparam. As I see it, I'm now getting two foundsets in one, is that clear enough ?
Thank you