How can we automatically populate the Site field value based on the Caller field.

Ria
Tera Contributor

How can we automatically populate the Site field value based on the Caller field for a specific catalog item?

Currently, both the Caller and Site fields are populated automatically. However, if the caller's name is changed, the site value does not update accordingly.

25 REPLIES 25

@Ria 

Sorry please share your catalog variables and their config screenshots.

Also without having a Reference variable pointing to sys_user on your catalog item your requirement cannot be achieved

This is how your catalog form should look like

1) Request on behalf - Type Reference pointing to SYS User

2) Site - Type Reference pointing to cmn_location

3) then you can use Auto populate feature

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

@Ria 

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

Shivalika
Mega Sage

Hello @Ria 

 

Is this on the platform or catalog ?

 

If this is in Platform - just use an "On Change client Script" to chanhe the site based on caller field change. 

 

And if it is on catalog form just use "Auto Populate" Tab in the variable - choose dependent as caller and dot walk to site. Now, whenever caller changes, site also will change definitely. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

Ria
Tera Contributor

Hi @Shivalika 

 

For the catalog form, we need to implement the changes. Should we create a new variable for the autopopulate dependent question since no variables are currently visible?

Hello @Ria 

 

Can you share screenshot ? What variable you done and what not ? 

 

Per your requirement there should be a "caller" variable which will be references from "user" the table and there should be another variable called "site" which can be string or reference per your requirement - auto  populated using the caller field.

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY