Performing Calculations in Wizard

0
I am attempting to do a calculation across multiple entities, for total price of an order, as well as total units.  For example Product A contains 5,632 units per pallet, so when a user selects wanting to order 14 pallets, I would like to perform the multiplication of 5632 by 14 pallets; however the pallet unit count is dictated by part number and all details are stored in a separate entity, and pallet order quantity is determined when completing an order. The resulting value is then stored in the “Order” entity Currently I have the user:  Select Part Number → Select Pallet Order Quantity → Total Units should return on same screen Also multiple varieties of units can be selected such as Product A, Product B, etc and I would need it to calculate the totals for each of these individually.  Is this best accomplished via a nanoflow or microflow, and what would be the best design for this flow? 
asked
2 answers
1

Without knowing your domain model in more detail, I would assume that you need something like a “basket”-entity, which is associated to the order. When adding an order to the basket, you could also update the counts etc. in a microflow. 

Btw. Difference between Microflow and Nanoflow: Nanoflows are only executed in client and currently support only a subset of the actions a microflow has. They have been introduced with native/hybrid offline apps and are designed for that purpose. I personally would stick to the Microflow for your purpose. 
 

answered
0

I would use microflows. Very useful here are the aggregate list activities. Create lists of items you want to sum, count etc using retrieve activitites, filters or change list activities and then sum/count using aggregate list.

I hope this helps. 

answered