If you would like this value to be computed for you, you can use a Hidden
Value to represent the difference (instead of an input question), and then
setting the expression you have to take the difference as the Calculate expression
for that hidden value.
If you want to display the result to the user, you can create a Label and
drag the new hidden value into its display message to the user.
-Clayton
···
On Mon, Jun 5, 2017 at 5:18 AM, Vipin Gupta wrote:
Hi,
In my form, I have repeat group and inside that repeat group, I have two
numbers - planned and actual and in third number field I need a difference
of those two numbers.
Enclosed is the screenshot of my form.
When I try to get difference it is giving me a warning and also it is not
calculating the difference in the form.
The most common pattern to follow for validation conditions which depend on the answers to multiple questions is to create a Label question with the Validation Condition false() whose display condition only makes it visible when the answers to the previous questions are invalid.
This allows you to pop up a message to explain the invalid input to the user, and block them from proceeding. Note: I believe the "block the user from proceeding" component of this solution currently doesn't work in Live Preview or Web Apps, but does work on the Android client, so you'll need to test that part on the phone directly.
I intentionally entered figures that didn't add up to 100 but it didn't prevent me from moving further into the survey, the only thing it did was not to display the label. How can i correct this please?