Forum Academy Marketplace Showcase Pricing Features

Saving input values based on other inputs

Hey all

Data structure as follows:

Customer > Contract > Products > Line Items

This feature is where a user adds a new “contract” to a “customer”. In the screenshot below, they are selecting which of the pre-configured “products” and “line items” should be attached to each “contract”.

I need to be able to do two things:

  1. Sum all “revenue amount” inputs where the toggle is “yes” (indicating it should be added).
  2. Breakdown the total amounts into categories, based on the “revenue frequency” drop down.

The result should be that I’m able to identify how much revenue is annual, monthly and one off, and then add this to the other data objects.

Any ideas?

I’m also open to a better way of doing this in general.