how to only show users which are having same department and manager of requested for ?

gayatri38
Giga Guru

I have created a field "Requested for" and when it is selected ,it auto-populates "Department" and "Manager".

Also, have created another field - "members" and it should show all the users which have both same department and same manager as requested for?

5 REPLIES 5

Abimbola
Tera Expert

Hi, can you provide more details for this question? screenshots might also be helpful.

gayatri38_1-1693414158754.png

 

Here the backend names are -

name = name

department = department

manager = manager

group member = group_member

if we select one user, the department and manager get auto-populated.

so, here have to show the list of users in group member field who have same department and same manager as the user in name field has.

Brad Bowman
Kilo Patron
Kilo Patron

The reference/list table for the members variable should be sys_user, with a reference qualifier like:

javascript:'department=' + current.variables.department + '^manager=' + current.variables.manager

which starts out with the word javascript followed by the colon symbol, then the quote.  This is assuming department and manager are the other variable names, and the names of the columns you are using on the sys_user table.  If this variable is a List Collector type, also add a Variable attribute like:

ref_qual_elements=department,manager

which will ensure that the list is updated when either of the two other variables change.

Hi Brad, 

     Tried the same way as you mentioned , but i am getting all users in the dropdown for members field. I tried using  current.name.department also instead of  current.variables.department, but no result. here's the snapshot for reference , Any idea on how to proceed further? 

gayatri38_0-1694110215528.png

Thanks in advance.