Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7286 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hallo,

I have 3 tables, Products, Orders, and OrderProducts.

Products is a list of all possible products, identified by ProductId

A record in Orders is created when someone phones with an order, and is given an OrderId

The Products for an Order are stored in OrderProducts, which contains OrderId, ProductId and Quantity.

On my order form I want to display data from the Order table in the header, then with a list of data from the OrderProducts, but for each OrderProduct I want to display data from the Products table, such as Product Name, Manufacturer etc.

How can I do this? I created a form based on Orders, then a portal for OrderProducts, but I can't work out how to display the Products data in the portal.

I am totally new to FM, so any help much appreciated.

- Frink

Posted

Your database architecture is fine. But you cannot nest portals. You could add calculated fields to the join file (OrderProducts) for ProductName, Manufactuer, etc. based on the ProductID (which get the values from Products). Then put those new fields in the portal.

  • 1 month later...
  • Newbies
Posted

The other way is instead of creating a form layout on Orders, create a list layout on OrderProducts. Then you make a larger header part with all the related order information, and a trailing grand summary for the order totals etc.

You will need this technique if you want to support orders with arbitrarily large numbers of lines, because you can't make a portal spill on to multiple pages nicely. I started out creating all my order and invoice print layouts as forms, and ended up having to recreate them as list layouts on the related table in order to support multi-page invoices and orders.

AJ

This topic is 7286 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.