How can I get the user's location id for use in form display logic? I know you can get the user id from the session, but are all the user properties there?
How to get user’s location ID for use in form display logic in CommCare
commcare
Related Topic
- Saving location name from multiple choice lookup table as a case property
- CommCare Supply: How to figure out what a Program’s ID is
- How to compute the time spent in a form
- Display the owner of a case in the case list
- CommCare – How to Use jr:itext Logic to Display Question Answers on a Label
- CommCare – How to Get Timestamp for Exact Time a Question is Answered
- How to conditionally display possible answers to multiselect (checkbox) questions based on previously entered information in CommCare
- How to display how long it takes to complete a form in CommCare by displaying a now() function
Best Answer
You can do this by accessing a user's Custom User Data.
To access the user's primary location, use this:
If the user is assigned to multiple locations, you can use this to get a space separated list of location ids: