A tax on plastic has been introduced that force my customers to account for plastic content in their products and pay for that. To make it possible to calculate this, I had to use a new field in the item file for plastic content, and this field should be seeded with data. Plastic content of certain groups of items can be set by a program loop, but there are many that must be entered one by one. The item file is huge and just a small fraction of all articles is used by each firm. Only the one that are really used need to be seeded with plastic weight.

To do that, I made a DbCJGrid with relevant Invoice lines and the plastic wight of the item file in one column. Invoice line is related to item. However, the plastic weight column was greyed out so nothing could be entered there. I supposed that was due to Set Foreign_Field_Option DD_KEYFIELD DD_NOPUT to True in Construct_Object of Invoiceline_DD. My idea was to change that temporarily in some way, but I wasn’t able to get the weight column accessible even when I changed NOPUT to False. Is it not possible to change data in a related table in a DbCJGrid like that?

An alternative solution is of course to read the invoice lines into a non dataaware grid and write the weights back to the item file. But then I am afraid there could be problems because the big no of invoice lines by some of my customers.