1

When making a hidden value question and filling in the Default Value with a question, CommCare gives me a warning.

enter image description here

What is the difference here between Default Value and Calculate condition? And why would a Default Value that references a question cause an error?

1 Answer 1

5

Great question! You seem like a swell dude.

The main difference between a calculate condition and default value is when the calculation will occur. Specifically, a default value will only be set once immediately upon opening the form. This is used primarily to load static values like case and session properties into the form.

Meanwhile, a calculate condition will fire multiple times during form entry (including at completion) so that its value always reflects the current state of the form accurately. This should be used for most purposes as calculates will be re-calculated based on answers given in the form.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.