Hello Everybody
I'm trying to make a Form with 2 DataSources which point to the same Table (DimensionAttribute for example).
My need is to display on a Grid 2 columns as financial dimenions (Departement and Site for example).
So under each DataSource i override the init() method like this :
For the first DataSource :
public void init() { super(); this.query().dataSourceTable(tableNum(DimensionAttribute)).addRange(fieldNum(DimensionAttribute,Name)).value('DEPARTMENT'); this.query().dataSourceTable(tableNum(DimensionAttribute)).findRange(fieldNum(DimensionAttribute,Name)).status(RangeStatus::Locked); }
For the secondDataSource :
public void init() { super(); this.query().dataSourceTable(tableNum(DimensionAttribute)).addRange(fieldNum(DimensionAttribute,Name)).value('SITE'); this.query().dataSourceTable(tableNum(DimensionAttribute)).findRange(fieldNum(DimensionAttribute,Name)).status(RangeStatus::Locked); }
But the problem is that when i execute the Form i see that only the first Column (with DEPARTMENT financial dimension) is filtred and the RangeStatus::Locked is applied.
for the second column no filter is applied and RangeStatus::Locked is not applied also ! and so for this second column all financial dimensions are listed (DEPARTMENT, SITE, CENTERCOST ....).
I remarked also that if remove my init() method from the first DataSource and execute the form that the filter on 'SITE financial dimension RangeStatus::Locked are applied for the first column instead of the second one !
What am I missing please ?
Thanks.
*This post is locked for comments