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 - LNG
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...

View solution in original post

Ankur Bawiskar
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.

View solution in original post

J Siva
Kilo Patron

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 - LNG
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...

Ankur Bawiskar
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.

@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.

J Siva
Kilo Patron

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