Versions Compared

Key

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

Welcome to the Hidden Value Calculations Tutorial.

This tutorial assumes that you have completed, at a minimum, the following tutorials  

Hidden Values allow you to build advanced or complex functions into your CommCare application without involving the mobile user. Before using this tutorial, we recommend you review the two articles below (or know the requisite skills):

 

Panel
borderStylesolid
titleHidden Value Calculations Tutorial Learning Objectives
borderStylesolid

In the Hidden Value Calculations Tutorial, you will learn the following:

  • The possible uses of Hidden values
  • How to use the Advanced Expression Editor Box
  • How to do basic calculations in a Hidden Value
  • How to write "if" statements
  • How to display the output from a calculation

...

  • 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.

...

  • Make sure you have completed CommCare Fundamentals and the Beginner TutorialIf you have NOT completed the beginner tutorial, but want to start with the beginner form already built, you can download the form here.

 

In the first part of the tutorial, you will learn how to do basic math with questions.

...