Avoiding circular reference with Filemaker portal calc

This should be easy, but I'm missing something. I'll simplify for my example.
On a monthly budget sheet there two portals, one showing invoices for screwdriver purchases, another for wrenches (one table for each tool). Sometimes, both tools are bought from the same supplier, however.

I need to find a way to sum the invoice amounts on the portal rows by supplier, so if we've bought screwdrivers and wrenches from the same company we can pay them with one check.

Pulling out hair, thanks in advance!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think the absolute easiest way would be to duplicate your lineItems table.
On that layout, add a sub-summary part when sorted by supplier ID or supplier name. Add in a summary field on amount - and place it in the sub-summary section.
Now all you do is find all the line items by invoice, by date range, whatever. Sort, then print this layout.

That should do it.

There is a "fancy-pants" way to do it where you build a new relationship based on a startDate, endDate, and supplier ID global fields added to budgetSheet. They would relate to the supplier ID, and the transaction date in the lineitems record. Add a SUM statement to sum the AMOUNT field on this relationship.
Then, you just enter a start date, end date, and the supplier ID...and it should show you the total.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
wtmusicAuthor Commented:
A good solution, possibly none better available in Filemaker
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.