To add a new datasource to the form InventOnHandItem, you have to follow these steps.
In my case I’ve added the (InventTable).GTIN to the form.
Add the table (in the example I’ve used the InventTable) to the form’s datasource
Modify the method modifyQuery in the class InventDimCtrl_Frm_OnHand:
- add the new datasource to the method declaration and add a new variable for the new QueryBuildDataSource:
- add the following code at the end of the method
- it is important that the field you want to add to the InventOnHandItem is the “group by field”.
This is the result: