Restriction on Username data element user selection

Hello,

We have one data element Username in Event program. Can we make restriction to that Username field, which will allow to select Users from specific org unit and user group. Currently we are able to select any user from the system even admin also.

Can we make restrictions somehow?

Thanks,
Hiral

Hi @ramavat

I believe your use case is similar to this post: Display, automatically, the user's name in the event form and it’s been a feature request here (Jira).

If this is is the case, I’d be happy to merge your topics and triage with an update to the team, please let me know.

If this is actually in your perspective a different use case, please explain.

Thank you!

@Gassim Thank you for your reply. It’s not that we need to display particular user name automatically, but something like we will be able to select the user from particular user group and org. unit, not all the users across organization.

Yes, thanks! I’d like more info from you please. :slight_smile:

To be exact:

  1. Data entry user selects a ‘username’ other than current user?
  2. Data entry user should only see specific ‘usernames’ (based on?) For example, each data entry user will see the users that are only in the same user group and assigned the same OUs as the data entry user?

In the previous issues/posts, the specific use case was mostly because it was sort of used for ‘auditing’. Seeing that this is a different request, would you please provide more details about the use case itself?

Understanding why you need to select usernames helps understand the situation, ask about best practices and what’s currently being done in similar situations, think of workarounds, and most importantly helps with creation of feature request.

@Gassim

Please find my below input.

  1. Yes, data entry user will select a username other than current user.
  2. No, Data entry user will be able to select the user from same org. unit but not with same user group that data entry user belong to.

Use case:
Let’s say we have a event program. Events will be created by user of “Case Worker” group.
Now, when data entry user us creating event, which is a kind of a Group Activity with list of participants.
That activity may have Health Consultants(Doctors), Psychologist etc, those we will select from the particular user groups that we have created for Doctors, Psychologist etc.

Can we restrict the user selection somehow, that if we have a username field to select only doctors, those list will be appear, not others.

Thanks,
Hiral

Hi @ramavat

Okay, thanks! I understand what you mean. There seems to be a challenge here with what’s technically currently possible and whether we’ll need to create a feature request or think of a workaround/best practices. We’ll need to experiment and see what works best!

In terms of functionality, are these Health Consultants going to need to interact with these events? In other words, is it added to the event because they are expected to follow-up or any kind of interaction because in that case maybe ‘assign’ events to user is more helpful?

However, in terms of restriction, unlike the organization unit data element, it doesn’t seem that we can currently restrict the list of usernames in the username data element. Your use case seems to have similar aspects to the (CHWs use cases, ) so maybe considering creation of OU for each Health Consultant? If you do so you will be able to select the Health Consultant as well as restrict the values to be only the OUs assigned to the 'case worker.

I hope this helps, and sorry if I missed anything here. Further discussion and input about the use case is welcome so we know what next steps to take.

Thanks!