Gillekes Posted August 24, 2016 Posted August 24, 2016 Hi everybody, I have the following situation: I have a product table. This table is related to a supplier table and each product can have many suppliers. Now I would like to crate an order based on a supplier. when chosing the dropdown list the products to be shown should only be the products related to this supplier. So I have an order table which relates to to the product table by means of line table (the order might have more than one product) In the the order form I have a portal with the line table. The line table has a pop-up menu with a value list showing the products form the products table. Now I would like to be able to include the values only related to the supplier selected in the order table. Could someone help me how to create this relation? Thank you for your time. Gilles
comment Posted August 24, 2016 Posted August 24, 2016 2 hours ago, Gillekes said: I have a product table. This table is related to a supplier table How exactly are these two tables related?
Gillekes Posted August 24, 2016 Author Posted August 24, 2016 I attached an immage of the relationship. product is = Artigos and supplier = Fornecedor_artigos relation2.tiff
comment Posted August 24, 2016 Posted August 24, 2016 I am afraid that does not answer my question. The relationship is many-to-many; is Fornecedor_artigos a join table?
comment Posted August 24, 2016 Posted August 24, 2016 Then I don't understand your setup. The way you show it, a product has many suppliers - but each supplier can have only one product.
Gillekes Posted August 24, 2016 Author Posted August 24, 2016 (edited) A product can have many suppliers and the supplier has many products. Fornecedores-artigos is a jointable afterall, i was wrong Edited August 24, 2016 by Gillekes
comment Posted August 24, 2016 Posted August 24, 2016 Well then assuming you have the following chain of relationships: Products -< ProductSuppliers >- Suppliers -< Orders -< LineItems you can define the value list to use values from Products::ProductID, include only related values starting from Orders.
Gillekes Posted August 24, 2016 Author Posted August 24, 2016 Ok I build it the wrong way... My order relation ships are in another way... Thanks for the help, I'll give it a try!
Recommended Posts
This topic is 3104 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now