Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

best way to transfer data to another layout

Status
Not open for further replies.

racdb

Technical User
Aug 30, 2004
2
US
I am new to creating databases and am having trouble figuring out the best way to set this up. I have two layouts. The first is where one enters distributor information for a product including name, address, phone, price, lead time, etc. The distributor's static info like name address and phone are looked up from an external file. Other information like cost and lead time will change and is not looked up in the external file, just entered. One can enter up to four distributors on the layout for a given product.
The second layout is the product page on which one enters the product name, description, image, etc. I also want to be able to select one of the four distributors and have the information appear on this layout. What is the best way to set this up?
One other question is how do I keep the two layouts connected since every product must have it's own distributor list. Should I be putting this all on the same layout?
I hope this isn't too confusing. Thank you in advance for any assistance.
Tracy
 
By the way, I'm using fmp 7 and am planning to use this database on the web.
Tracy
 
Hello,

I think you want this:
Table of distributors, which it sounds like you already have. Source of looked-up information
Table of distributor-product links, which connect distributors to products and contains information about that distributors ability to deliver product, i.e., lead time and price
Table of products, which is just product information.

Use some auto-enter, unique, not empty serial number field as a primary key in distributors and products. Can be type number or text.

The magic is in distributor-product link file (can we call it 'dplink' from here on?), which should contain its own primary key, defined as above, but should also have a matching field type to act as a foreign key from distributors and from products. For instance, you might have Dist# defined as a number field, and Prod# defined as a number field. On your relationship graph, drag Prod# to the primary key you defined in products, drag Dist# to the primary key you defined in Distributors. Voila, you have a link file. Allow creation of records in link file from Distributors, allow creation of records in Products from dplink file.
Slap a portal on the layout from context Distributors to Products via dplink. Now you can create product records that are linked to a distributor. Include product fields like name, description, weight, etc. in the portal, and fields from dplink as well, like lead time and price. These fields will describe the unique conditions of the distributors ability to deliver that product.
Do a 'go to related records' to Products via dplink, and you'll have the product record(s), with the ability to look back at the possible distributors of this product by looking at Distributors via dplink.

I hope this made sense, please post if it didn't. In FM7, you always have to remember the context of where you are standing, i.e., which table from the graph is being presented on the layout, and what context are you displaying in portals. The graph is really, really super important to get right in FM7, and don't be afraid to make new table occurrences of tables as needed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top