A question about a listbox on a subform
Posted: Sun Mar 10, 2019 2:49 pm
In my database in Postgresql, I have these tables: company (companyid, companyname, ...), product (productid, productname, ...), buyerproductname (buyerpdtid, productid, buyerid, buyerpdtname, ...), salesorder (salesorderid, buyerid, ...), salesorderitem (salesorderitemid, salesorderid, buyerpdtid, ...).
In LO Base, I have a form with salesorder as the underlying table of the main form and salesorderitem as the subform, for data input. In the subform, I want to let the user to choose the buyer's product name (buyerpdtname) from a list (so a listbox) which will feed the buyerpdtid field. Obviously buyerid is not present in the salesorderitem table but the salesorder table. How can I do that?
We have our own product names but for certain buyers and products they will buy, they have their own product names. That's why there is a separate table for buyers' product names.
So, another issue is, what are the ways to deal with this and which is the best one? I think one is to use our own product name where the buyer has no their own. Another one is to leave it blank in the table for buyers' product names (buyerpdtname).
Any help would be much apprciated.
In LO Base, I have a form with salesorder as the underlying table of the main form and salesorderitem as the subform, for data input. In the subform, I want to let the user to choose the buyer's product name (buyerpdtname) from a list (so a listbox) which will feed the buyerpdtid field. Obviously buyerid is not present in the salesorderitem table but the salesorder table. How can I do that?
We have our own product names but for certain buyers and products they will buy, they have their own product names. That's why there is a separate table for buyers' product names.
So, another issue is, what are the ways to deal with this and which is the best one? I think one is to use our own product name where the buyer has no their own. Another one is to leave it blank in the table for buyers' product names (buyerpdtname).
Any help would be much apprciated.