Service catalog

ShhivaaA
Tera Contributor

How to get the user manager's manager name(supervisor) in service catalog.

 

example: request for Shiva, then in the catalog I need to get shiva's manager's manager.

3 ACCEPTED SOLUTIONS

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @ShhivaaA 

Create a new variable called "manager", and then proceed with the dot-walking approach.
Alternatively, you can use the auto-populate feature in the variable settings.

 

https://www.servicenow.com/community/developer-articles/auto-populate-reference-data-in-service-cata...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@ShhivaaA 

If you require logged in user's manager->manager then you can use this in default value

javascript: var user; var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", gs.getUserID());
gr.query();
if (gr.next()) {
   user = gr.manager.manager.toString();
}
user;

OR

If you are allowing user to select the User and then want to bring Manager's -> Manager, then you can use Auto populate feature and no scripting required

Auto-populate a variable based on a reference type variable (Utah) 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

J Siva
Tera Sage

Hi @ShhivaaA 

As Dr Atul G-LNG mentioned you can use no code feature called "Auto populate".

For that, you must have a requested for variable in your catalog item.

Sample:

Screenshot_20250728-192902.pngScreenshot_20250728-192839.pngScreenshot_20250728-192922.png

 

Regards,

Siva

View solution in original post

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @ShhivaaA 

Create a new variable called "manager", and then proceed with the dot-walking approach.
Alternatively, you can use the auto-populate feature in the variable settings.

 

https://www.servicenow.com/community/developer-articles/auto-populate-reference-data-in-service-cata...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@ShhivaaA 

If you require logged in user's manager->manager then you can use this in default value

javascript: var user; var gr = new GlideRecord("sys_user");
gr.addQuery("sys_id", gs.getUserID());
gr.query();
if (gr.next()) {
   user = gr.manager.manager.toString();
}
user;

OR

If you are allowing user to select the User and then want to bring Manager's -> Manager, then you can use Auto populate feature and no scripting required

Auto-populate a variable based on a reference type variable (Utah) 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@ShhivaaA 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

J Siva
Tera Sage

Hi @ShhivaaA 

As Dr Atul G-LNG mentioned you can use no code feature called "Auto populate".

For that, you must have a requested for variable in your catalog item.

Sample:

Screenshot_20250728-192902.pngScreenshot_20250728-192839.pngScreenshot_20250728-192922.png

 

Regards,

Siva