Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to Display User Department in Catalog item Variable

ch_karthikeya
Tera Contributor
1 ACCEPTED SOLUTION

Hi Ashutosh,



i requested currently logged in   user Department only



now i got the result :   javascript: gs.getUser().getDepartmentID();




find_real_file.png


View solution in original post

12 REPLIES 12

Hi Naveen87,

 

I know this is a very post, but I came across it while experiencing the same problem and thought I would reply in case anyone else comes across this article.

 

I solved the problem by using the following:

javascript:gs.getUser().getRecord().getDisplayValue('department');

 

Hopefully this helps someone else.

 

Thanks,

Adrian

sudhakarsnow1
Tera Contributor

Could someone help here ? Department is not displaying

Hi @sudhakarsnow1 this is a different use case right? you are trying to create a dynamic filter to show users within the same department?