How to calculate subtotals from data entered into portals?
I have found MANY answers to this question, but none of them seem to work for my situation. The screenshot shows my situation.
The "Quote" layout is based on the table <quote_main>. Each quote has a an ID and some other relevent fields.
Each quote can contain multiple units, so on the left is a portal that displays information from the <units> table. This is a standard portal setup, linked back to the <quote_main> by the quote_ID.
Each unit is made up of several line items, each with a different price. These are displayed on the portal on the right, based on a table called <line_items>. This works by clicking the "select" button in the units portal, which changes the value of the field in the <Quote_Main> table to which the <line_item> table is related. The portal on the right only shows what's related to the active unit, it is not filtered.
So the question is, how do I enter a field in one table, that goes out and adds up a defined set of fields in a second table?