Create a Calculation Question
You can add a calculation question to allow the device user to tap a button to trigger a calculation in the form. The result can then be evaluated in a form report. Calculations can use numbers, the values entered in answer to other questions in the form, and custom variables. They support most mathematical operators as well as if-then-else expressions.
- In the Form Designer screen, click Insert Question.
In Question Title field on the Insert Question window, enter the
text of the question.
You do not need to end the text with a question mark.
(Optional) In the Question Advice field, enter text to
display on the device in smaller text under the Question Title.
You can write this in the form of a question with a question mark, or write explanatory text.
- In the Question Type field, select Calculation.
In the calculator interface, click buttons to create your calculation or
For examples of typical calculations and expressions, see Calculation questions.
Button Meaning Un Undoes the last action. ( Left bracket. ) Right bracket. When creating if-then-else expressions, you must add the closing bracket manually. , Comma for use in if-then-else expressions C Clears the entire calculation Q Question lookup displays so you can select a form question to refer to Number buttons 0–9 Numbers / Division CV Custom variable lookup displays so you can refer to a simple or complex custom variable * Multiplication √ Square root - Subtraction iif Starts an if-then-else expression. You must also manually add commas and a closing bracket to the expression. . Decimal = Equals + Addition <> Does not equal > Greater than < Less than Add Text text box Enter text that you want in the expression. You cannot use the delete key on your keyboard to make changes in the text box. Instead use the C or Un button. Add Text button Adds the text that has been entered in the text box, surrounded with single quotation marks (' '), to the expression. NA Adds the text 'N/A' to an expression. Used mainly to refer to questions that allow N/A answers
Do one of the following to save the question:
- Click Save to return to the Form Designer.
- Click Save & New to insert another question of the same question type.