Filtering values in data entry fields of Organisation Unit type

Is there a way to have, for example, 2 fields both of type Organisation Unit, in a data entry field (specifically Tracker) so that the second field is filtered based on the selection of the first.

So, in this example, the second OU field would only show org units that are under the OU selected in the first field
Screenshot 2023-06-26 145519

And furthermore, is there a way to limit the values in any data type Organisation Unit to only a certain level (e.g., only show facility level OUs).

I’m guessing it could be done with some javascript or something. I’m wondering if anyone has implemented something like this and cares to share their code. It comes up frequently for us and I would assume it does for others too.

Hi @LauraLincks

I have a suggestion which might be a long process; however, from my perspective it should work just fine. You might want to export your OU hierarchy and create a number of option sets which you can control using Program Rules that will help you achieve the amount of control/filtering you mentioned in your post.

Another option is to control the capture rights that are assigned to the users. The OU Data Element will only display the OUs the data entry user is allowed to insert values into.

I hope one of the suggestions help. You can always create a feature request if you believe the use case requires them and the current features aren’t satisfying the requirements.