Auto-Filling Username and Designation in DHIS2 Forms

Hello DHIS2 Community,

I am working on a tracker program where I need to auto-fill the username and designation of the logged-in user in a form. I found that the value type “Username” can be used for fetching usernames, but I am unsure how to retrieve and display the user’s designation dynamically.

I have a few questions regarding this:

  1. How can I auto-fill the logged-in user’s username in a form field?
  2. Is there a way to retrieve and display the user’s designation dynamically?
  3. Can program rules or scripts be used to achieve this in both the web and Android versions of DHIS2?
  4. Are there any limitations or workarounds for this functionality?

I would appreciate any guidance or examples on implementing this feature.

Thank you!

Hi @SanghArsha_PyakuRel

Thank you for your post. I don’t understand what do you mean by user’s designation. Would you please clarify?

Thanks!

Thank you for your response. Users designation means users role .i have a field of users name and user role in form .how to assign the value of users and users role dynamically!