Using Calculations in Modeling
You can use calculations when modeling User Defined Assessments. Perform basic formula calculations using the Event Definition logic already supported within Form Definition.
In the Event Definition section of the Form Definition, create new events that set the value of a table column to the result of a simple arithmetic calculation on two or more table columns.
Prerequisites:
- RADplus 2011 Patch 299
- Avatar 2011.09.00 Build 1130
Functionality
Create simple calculations to populate prompts on a form.
The selection Calculation Result is added to the Set Table Column Value To field.
The Calculation Type field has the following selections:
- Sum
- Addition
- Subtraction
- Multiplication
- Division
- Percentage
- Truncation
- Rounding
The standard modeling tools can only summarize integer, dollar, decimal, and percent values. To summarize based on dictionary selections, you will need to use ScriptLink.
Calculation results display
The formatting of the column type controls how the result will display.
Integers will truncate the result, without rounding.
For example, "2.666" will display as "2".
Dollar results will be rounded to two decimal places.
For example, "2.666" will display as "2.67".
Calculation Details
The user must create an integer, decimal or dollar field to store the total value of the formula. This field must be defined in the Table Column To Have Value Changed on Event field, to receive the calculation result.
Binary operations
(Addition, Subtraction, Multiplication, Division, or Percentage selected in the Calculation Type field) the field that triggers the event is considered the right operand. A left operand must be selected (Left Operand field).
Unary operations, (Truncation, or Rounding selected in the Calculation Type field):
Enter the number of decimals in the Number of Decimal Places field.
Sum operations
Select the field to use apply to the sum, in the Fields for Summation field.
This field populates with dollar, decimal and integer columns.
Summation calculations are triggered by the Fields for Summation field, and the field the event is based on.
