options in a field based on other field

MARISA INACIO1
Tera Contributor

Hello everyone

 

I have one field populated with the department of the logged in user and I have another List collector field with all users.
I would like to know how I can do the following. If I manually change the department, in the other users field I just want to be shown to choose users that belong to the department I indicate in the other field.

 

Thanks in advance

 

1 ACCEPTED SOLUTION

Also If you only want to display users from Department to be populated then there is no need to write script include also.

You just need to update reference qualifier on User Variable

javascript: "department.sys_idIN" + current.variables.department

you can replace 'current.variables.<with your variable name>'

 

VishalBirajdar7_0-1676549385784.png

 

 

Hope this will work for you...!!

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates

View solution in original post

5 REPLIES 5

Also If you only want to display users from Department to be populated then there is no need to write script include also.

You just need to update reference qualifier on User Variable

javascript&colon; "department.sys_idIN" + current.variables.department

you can replace 'current.variables.<with your variable name>'

 

VishalBirajdar7_0-1676549385784.png

 

 

Hope this will work for you...!!

 

Vishal Birajdar
ServiceNow Developer

I know one thing, and that is that I know nothing.
- Socrates