Basic calculation help required

@joefarrowsmith

My apologies to all that I have not read the entire thread in detail, but I did scan through it. :grimacing:

Perhaps something along these lines could help a bit. Notwithstanding the current UI, current flows and current dB structure and exact names of the objects … the following aims to be somewhat of a reference:

Order
Title (text)
Total dollar amount (number)
Line items (list of line items)

Product
Name (text)
Price (number)

Line item
Product (product)
Quantity (number)
Order (order)
Dollar amount (number)

  • Create an order
  • Create the line items assigning product and order
  • Add each line item as it is created to the order’s list of line items
  • In the rg of line items (let’s call it rg A) the user inserts the quantity in an input of type number and a flow (trigger when input value changes) calculates the line item amount
  • Below the rg in a group’s of type number populate its data source with an expression “rg A’s list of line items amount :sum” and use this group to load the total amount to the order’s total amount field.

Hope this sparks some ideas :grinning:

1 Like