Summary

This article covers the Compute Value Conditional Action. The Compute Value allows a User to build an assortment of arithmetic operations with a variety of operands.

You do not need a trigger field to fire a compute button.  The calculation will always fire on save or if you hit the calculator icon next to the field to be computed. See Fig 2, for an example of a calculator for the Datatrak Direct web.


1) When a user selects the Conditional Action type Compute Value

2) A dialog box opens at the bottom of the Conditional Actions Builder as shown in the figure below.


The example below is a compute for age.

Fig 1

Operators are as follow:


+ = Addition

- = Subtraction

* = Multiply

/ = Divide

, = Comma (operator)



BMI Sample Formula:


Formula: weight (lb) / [height (in)]2 x 703

Calculate BMI by dividing weight in pounds (lbs) by height in inches (in) squared and multiplying by a conversion factor of 703.

Example: Weight = 220 lbs, Height = 6’0″ (72″)
Calculation: [220 ÷ (72)2] x 703 = 29.8


Fig 2


The example below is a BMI calculation on the web


The example below is a BMI calculation on the Mobile application




Another way is to do a scoring field on the web is to add up the fields as shown below in Fig 3 below:



The condition will look like Fig 4 below: Notice how there are no trigger fields used. The calculator next to the field will compute, or on save of form, it will always compute.



When using a Compute Value Conditional Action, and assigning calculations based on other form fields, note that
    •Zero cannot be assumed for a blank value (use blank instead of assuming 0 when the field is blank)
    •All fields that are assigned to the computation formula should be marked as required





Need more help?

Please visit the Datatrak Contact Information page.