Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • To calculate something: Sometimes you may wish to perform a calculation in a form. For example, you may ask someone their birthdate and then want to calculate their age. You can directly ask the mobile user to input their birthdate using a date type question, and then you can use a hidden value to transform the entered value into their age! Or you may have a series of questions that ask how much land a farmer has under cultivation for different crops. You can then use a hidden value to add them up.
  • To store a value from another form: Since CommCare uses case management, sometimes you will want to carry data among across forms. For example, in a registration form, you may ask someone their birthdate. Later in a followup form, there may be a question that you want to ask an individual only if they are above a certain age. You can use a hidden value as a "box" to hold the person's birthdate, so that you can refer to it for the followup form.
  • To account for something in data exports: You may want to have a column in your data exports that identifies people who are at high risk for pregnancy complications. Say that you define high risk as someone over a certain age, with at least one danger sign, and in their third trimester of pregnancy. To identify people at high risk for pregnancy complications, you could have someone look at all three of those values or you could create a hidden value that has the value "yes" to determine if all of those conditions are true.

...