Versions Compared

Key

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

Overview

Case management allows you to save data from one form and use that data later on in another form.  Here's how to set this up:

Say you want to use the answer to "What is your edd?" in Registration later on in your Followup form.

  1. Set up case management in your application
  2. Create a question in Registration for "What is your edd?".  It doesn't matter what the question ID is.
  3. In the case configuration for the Registration form, check the "updates the case" checkbox.  
    1. Select "What is your edd?" from the dropdown
    2. Write "edd" in the case property box.  
    3. Hit "save". The answer to "What is your edd" is now saved to the case as case property "edd"

...

  1. Check the "Loads data from the case" checkbox
  2. Select "/data/edd_from_reg (hidden)" from the dropdown
  3. Give it the case property name "edd".  Note that this MUST be the same name you gave the case property in Registration.
  4. Hit "save".  The case property "edd" is now preloaded into the hidden value "edd_from_reg"

...

  1. In the followup form, reference that case property by typing #case/ and choosing the property you want to reference

NOTE: 

When data get saved to the case as properties, they're always saved as

...

text.  If you

...

reference them

...

in a form, even if you set the data type to be "date" or "int" or whatever is appropriate, they're still really strings. If you want to use it in a calculate or a comparison expression, you have to "cast" it to the desired data type.  For example, if you

...

reference a property into the hidden value "

...

date_question", you have to reference it as date(#case/

...

date_question).  Other available cast operators are int(), boolean(), number() and string().