Setting Accounts by Calculating Amounts

Another common task is to calculate the amounts contained in two accounts and then insert the result into another account. The EXP function supports addition, subtraction, multiplication, and division on the right side of the equal sign in its argument.

In this example, the Calculation rule divides the Sales account’s value by the UnitsSold account’s value, and inserts the quotient in the AvgPrice account:

HS.EXP "A#AvgPrice = A#Sales / A#UnitsSold"