Hi
The customer requirement for the form is: 2 Fast tabs with independent grid and independent datasource, so two datasources.
The form pattern is "Simple Details w/Fast Tabs" - Not sure if there is a more correct pattern, but so far this is the only pattern that I could get working without BP errors / warnings based on the customer requirements.
As mentioned, there is 2 tabs, both have 'Custom' as pattern, each have a grid which is connected to a datasource, and a field group is used to display the data in the grid
There is no relations between the two tables and there will not be any interaction between the two grids.
The form is called from another form so in the init method, I get the passed record in the args().record() method, i store the values in in parmXXX() methods.
then in executeQuery() I have something like this:
SysQuery::findOrCreateRange(this.queryBuildDataSource(),fieldNum(TableA, FieldA)).value(element.parmXXX());
SysQuery::findOrCreateRange(this.queryBuildDataSource(),fieldNum(TableA,FieldB)).value(element.parmYYYY());
before the super call, so in general nothing special.
When the form is launched, the correct data is displayed.
When the user activate the Advanced filter on the form (Ctrl+f3) , the pre-filled values is in the filter form is from the upper datasource, which is what is the requirement, if the user then press Apply, with or without any changes, then the data in both datasources is refreshed. The data in the upper grid is refreshed with the values form the filter, the data in the lower grid has all values in the ranges reset - which mean that the grid shows all records form the datasource disregarding the values that is set in the executeQuery() method.
I have set the datasource of the design to Datasource_one, on the Main tab the datasource is Datasource_one, on the tab that holds the upper grid the datasource is Datasource_one and then on the tab that contains the the second grid I have Datasource_two - and I have tried with no datasource on any of the tabs.
In the perfect world, I would like to have 2 different Filters, but I do not think that it's possible.
Second best is that the filter only works on one of the datasources and leave the second as it is.
What have I missed?
Thanks
Kind regards
Steen