Multiplying two attributes

0
Hello I have posted something similar before but with no real success.  What is the most effective way to multiply two attributes, both of type integer.  One is the number of pallets that are being ordered, another is the number of units per pallet, these attributes exist in two separate entities. When doing order entry, I need the system to multiple the number of pallets by the number of units, so that the total unit count can be created. Multiple unit types may be entered on one order with varying counts. I am just very unsure of how to accomplish this reasonably, also have been unable to find a learning path associated to this
asked
3 answers
1

You can do the multiplication in a microflow, that you trigger every time you change the number of pallets or the pallet type. An ‘OnChange’-microflow. Use the pallet type to retrieve the number of unit per that type of pallet.

Alternatively, you can add a calculation field to the orderline-entity and use the same microflow to do the math. Useful for showing that ‘number of units’ in an object on a view (datagrid, dataview, listview).

 

The microflow probably look something like this:

answered
1

Here’s an example from one of my apps.  In this decimal variable, total bottles is calculated for a shipment of cases of wine.  Maybe this will help?

answered
0

 

When trying to use these for a calculated attribute, i am getting the error that it cannot have side effects to be used in calculating a field. 

answered