I've setup case management in my application. Now I would like to load the selected case's id into the Calculate Condition of one of my hidden variables. How do I do that?
How to load a case_id into a form
commcare
Related Topic
- Case Properties saved in one app and referenced in another via case sharing
- What does an irrelevant question evaluate to in CommCare
- How to format a date property in case list or case detail
- CommCare – How to Get Timestamp for Exact Time a Question is Answered
- How to translate outcomes of hidden value calculations in multi-lingual application
- Conditional Display in CommCare – How to Show Questions Based on Lookup Table Answers
- Default values for a checkbox question
- Load case_id into a registration form
Best Answer
You can use the session instance path to get the currently selected case's case_id (see CommCare Session Instance help page):
instance('commcaresession')/session/data/case_id
The link above also describes the syntax to load other session user or device data.