I have 2 top-level locations, but I need users to access both locations. Do they need 2 different mobile user profiles?
no you can assign a user to multiple locations. it’s only the default location that needs to be a single one
do we then need to add a new question when we are registering a client in the field so that they are assigned to the correct location?
for all forms that create cases, you do need to ask which location to create the case under - if you have case sharing enabled.
the app needs to know where to set the ownership basically and it will not let you register cases if your user has more than one location or case sharing group under their account. you can also compute the correct location in the background and update the owner column of the case in your case management screen.
from my experience, commcare will not let you know if you are doing something illogical here. so, you CAN break your case if you set the ownership to an ID that you shouldn’t.
Thanks for that, Yes this is my fear, my app has no down time so cant be out of action. Thanks for your help.
you can make modifications and fixes without affecting the published version of the app.
this is what the “Released/in test” button is for
users will not get the updates to the app until you release them by making a new build and clicking on the released status
This is a classic CommCare setup question! Usually, if you need a user to see data from two different spots, it’s easier to assign them to a level in the organization hierarchy that sits above both locations. That way, the 'child' locations automatically roll up to them without you having to mess with multiple profiles or complex filtering.
Looking at this conversation, I can see that the main question has already been addressed, but let me provide some additional clarity based on the CommCare knowledge base:
No, you don't need 2 mobile user profiles. As Mazz correctly mentioned, a single user can be assigned to multiple locations - you just need to specify one as their primary/default location.
However, there are important considerations:
-
Case Registration with Multiple Locations: When a user has access to multiple locations and case sharing is enabled, you need to explicitly specify which location a case should be assigned to during registration. This is typically done by adding a question in your form or computing it in the background.
-
Organization Hierarchy Approach: Eris_Casper's suggestion is also valid - if users need to access cases from multiple locations, another approach is to assign them to a parent location in your organization hierarchy. This way they automatically have access to cases from all child locations beneath them.
The right approach depends on your specific use case:
- If users need to create cases under different locations, you'll want to follow the guidance in the article Mazz shared about assigning cases to specific locations
- If users mainly need to view/access cases from multiple locations, assigning them to a parent location in the hierarchy might be simpler
The key documentation for this is here: https://dimagi.atlassian.net/wiki/spaces/commcarepublic/pages/2143954136/Assigning+Cases+to+One+of+Multiple+Locations
Does this help clarify your options? Feel free to ask if you need more specific guidance for your particular workflow!
