Versions Compared

Key

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

...

Data associated with the user case can be found in theĀ Case Data Export section. It will be listed as case type commcare-user and will have the same name as a mobile worker's username.

Advanced: Raw User Property References

In some contexts in HQ where easy references aren't supported, you may need to write the reference for the "User Case" or Custom User Property from scratch, similar to Location data.

Translations for these references are provided below. The Easy Reference is how the property would be referenced from within a supported form, and the 'raw reference' can be used in other contexts to refer to the same property.

Easy Reference

Raw Reference

#user/first_name

instance('casedb')/casedb/case[@case_type='commcare-user'][hq_user_id=instance('commcaresession')/session/context/userid]/first_name

#user/custom_property

instance('casedb')/casedb/case[@case_type='commcare-user'][hq_user_id=instance('commcaresession')/session/context/userid]/custom_property