Hi All,
I am adding several fields to the BOMCalcTrans form. I was able to add some of the fields using Display methods on the 'BOMCalcTransDetailUnionAll' view. I also need to add Vendor name to the grid, but not as a display method since it needs to be able to be filtered/sorted by.
From BOMCalcTrans I should be able to get the Vendor ID, and then get the Party from VendTable to get the name from DirPartyTable using outer joins. I used this method before in other forms without issue.
The issue here is, when I add VendTable and DirPartyTable as form data sources, the columns in the grid are blank. I added VendTable as outer joined with its source as BOMCalcTrans:
I added DirPartyTable, with its join source as VendTable:
I then added the AccountNum field from VendTable, and the Name field from DirPartyTable to the grid:
Both AccountNum and Name columns in the grid are blank. All the correct record lines are returned, the added fields are just never populated.
I see that BOMCalcTrans is actually a view, 'BOMCalcTransDetailUnionAll':
I haven't added fields to a form with the data source setup like this yet. I searched around this forum and in the MS docs and was not able to find or determine the correct way to go about adding the fields to this form. I'm aware that in some forms I need to add the new fields to the query, but in this case the underlying query for BOMCalcTrans is a union query, which I'm not familiar with.
Any help or nudge in the right direction would be greatly appreciated. Thank you!
As you mentioned, the data source on that form is actually the BOMCalcTransDetailUnionAll view. The relation you are looking at is for the BOMCalcTrans table so its not valid in this scenario. In the user interface if you right click on a control in the form, hover over "form information" and then click the "form name" it will open a window with more details including the query it is using. You will probably see that it is joining on fields that don't make sense.
To resolve it you will need to use one of these approaches:
Personally I would go with option 1. 3 is easier but I don't like adding relations to standard objects unless it is for a custom field/table.
Sohaib Cheema
708
User Group Leader
Martin Dráb
589
Most Valuable Professional
Yng Lih
553