Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

How many of each product has a customer bought


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

Recommended Posts

Posted

In a typical customer invoicing relationship: Customers to Invoices to LineItems to Products

I can put a portal on a customer layout to see what products they have bought (portal connects to Products table). But how would I get the quantity of each product they have bought to display in that portal?

Posted

You need another relationship between Products and LineItems, which will include only line items of the customer you are currently looking at. Assuming there is no CustomerID in LineItems, this relationship needs to be:

Products::ProductID = LineItems 2::ProductID

AND

Products::gInvoiceIDs = LineItems 2::InvoiceID

Products::gInvoicesIDs is a global Text field that you need to populate by a script triggered by loading a record in the Customers layout, setting it to =

List ( Invoices::InvoiceID )

  • 1 month later...
Posted

You need another relationship between Products and LineItems, which will include only line items of the customer you are currently looking at. Assuming there is no CustomerID in LineItems, this relationship needs to be:

Products::ProductID = LineItems 2::ProductID

AND

Products::gInvoiceIDs = LineItems 2::InvoiceID

Products::gInvoicesIDs is a global Text field that you need to populate by a script triggered by loading a record in the Customers layout, setting it to =

List ( Invoices::InvoiceID )

& to grab the data, do you just use the new Table Occurrence just created with that relationship or this would be a multi-predicate join only?

This topic is 4677 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.