James Chung Posted June 18, 2008 Posted June 18, 2008 I have an order with many types of equipment, but each equipment has many parts. What should I do in order to display the equipments with related parts on the order layout? I have trying to solve the problems for a while but I am still very confused about it. Could anyone help me and explain it to me by the sample that I attached? Thanks. One_to_many_to_many.zip
jrr316 Posted June 18, 2008 Posted June 18, 2008 Hello, What you are going to want to do is set a global filed to the Equipment ID you wish to add parts for. Create a Relationship to Parts based on this global Field and then create your parts in that portal. I have attached your file with the modification. -Justin One_to_many_to_many.fp7.zip
mz123 Posted June 18, 2008 Posted June 18, 2008 Looks like someone beat me to it but I'll attach my sample file anyway. I took a slightly different approach. You'll have a "Pieces" table or whatever name suits its purpose, that relates a piece of equipment to a part. Then, you'll createa "LineItem" table that relates an order number to an equipment number Then, on the lineitem layout, you can show related data to see the equipment name and the related parts, via portal. Click on "View Order" and then go to Preview Mode. I've also added sliding. Hope that helps! Let me know if you need more explanation! One_to_many_to_many.fp7.zip
James Chung Posted June 18, 2008 Author Posted June 18, 2008 Thanks for your help, this is the exactly solution that I was trying to solve. Thanks a lot. you have save me a lot of time. Best Regards, James
James Chung Posted June 18, 2008 Author Posted June 18, 2008 Sorry to bother you again. If I wanna add one more table (Customers), what the relationships will be? one customer --> many orders --> each order has many equipments --> each equipment has many parts. Could you modify your sample so that I can understand this skill better. James One_to_many_to_many_to_many.zip
jrr316 Posted June 19, 2008 Posted June 19, 2008 Attached is a file integrating customers. Your data entry is going to be in Orders for Equipment and Parts, and you select a customer to relate to the order. Hope this helps. One_to_many_to_many.fp7.zip
James Chung Posted June 20, 2008 Author Posted June 20, 2008 Thank you for your help again, I am getting to know the "set field" function. could you please talk a look my sample again. Can we add one more function? Sorry about my explanation. Regards, James sample.zip
Søren Dyhr Posted June 20, 2008 Posted June 20, 2008 Not to spoil the party here, but oftentimes would structure like this prove inadequate, you can't by it, have parts build by other parts - assemblies. For that would I urge you to read about recursive structures: http://jonathanstark.com/recursive_data_structures.php --sd
jrr316 Posted June 23, 2008 Posted June 23, 2008 That is a good article, gives a different spin on how to approach this type of problem.
James Chung Posted June 25, 2008 Author Posted June 25, 2008 Hello there, I just checked your sample again and I found out that when I add a new record, the g_EquipmentID will show the last record. Is there any way that when you add a new order, the selected parts will not display from the last record until you push the bottom? Thanks Best Regards, James
jrr316 Posted July 3, 2008 Posted July 3, 2008 Sorry for the delay getting back to you. Create a script that Creates a New Record and then Sets the global field to "". You can then either put a button on the page or make a custom menu item for that script.
James Chung Posted July 9, 2008 Author Posted July 9, 2008 Thank you very much. I did it already. Best Regards, James
Recommended Posts
This topic is 6040 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