Errors with organisation case sharing - unable to open new case

Hi all,

I really need some urgent help if possible. I'm hitting an issue with organisations and case sharing. I've set up the levels and changed all the owners to the correct org names. The cases are being shared fine, but when I try to open a case, I get the usual error message of 'the user must be in one group'.

The only time it seems to work fine is when I'm logged in at the lowest level of the organisation, then I'm allowed to open cases no problem. I have manually changes the owner name of the children so i don't think that's the issue but maybe I've made an error somewhere?

Please help

my dear friend this is the infamous error that most of us will face at least once.
"but I AM only in ONE case sharing group goddammit!!! where are these other groups coming from and what are they?"

If I had a dollar for every time I heard this question, I would be able to afford a sandwich.

Essentially you are right. your mobile worker is in one case sharing group. But because the mobile worker is on a level that can view children, it has access to more than one case sharing group. it is also probably a part of their job to view data, not to collect it. so, when you try to start a form that registers a case, it doesn't know which case sharing group to assign as the owner. the reason it works find when the mobile worker is at the bottom of the tree is because THEY can only access one case sharing group, and so the form is not confused which one it should use as the case owner.

so how do I solve it?
long story short, you need write a hidden calculation that grabs the primary location of the user, or some other criteria for selecting the location like a multiple choice question with locations as options, and then use that to update the owner_id property. the form will break if it does not see that you are manually updating the "Owner_ID" field.

if you just try to update the owner_id property with an incorrect value or a blank, i think it defaults to the mobile worker ID. so no case sharing would be active in this case.

1 Like

Ok, this is working better now! Thanks. Sheeesh

I have a follow up question: If I want all users in the hierarchy to be able to open cases, but the case must exist and be accessible to the lowest level of the hierarchy, do I need to insert the location code for the bottom level when I create a new case? So that it woudn;t matter who open the case. And would the 'child' of that new case need to have the 'parent' location code so as to belong only to that parent?

Thanks so much for your help, really useful!

correct
you would need to make the owner of the case the lowest level and make the levels above it "can view child cases"
this applies to all cases I believe, regardless of it being a child case or not.
the view child cases here refers to cases owned by child locations, not cases that are child cases. confusing, I know.

Hmmm the issue I seem to be having is that i can now create cases, which is great, but they disappear from the case list once I synch... :woozy_face:

case sharing troubleshooting starts with a download of the case data to check out the owner id of these cases.
I don't know how your case set up looks like, but it starts with owner id of the case, and whether or not that id is an id that this mobile worker should be able to see

That's a good point, ja I'll be able to see who owns the case, I did use the webapp builder and in the form it was showing what I would expect, but this is helpful, thank you!