The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Pavankumar_1
Mega Patron

If you are looking to populate the data from the Reference variable this article will help you to achieve.

Note: This will be available on Utah version.

No scripting required for this.

1. I have created a catalog with 3 variables as below.

a. Requested For(Reference -sys_user)

b. Manager (Single Line Text)

c. Department (Reference -cmn_department)

Use case:  Whenever user selected on the Requested For, need to populate the manager and Department of that user on corresponding variables.

2. Once you create the variables go to the manager variable form it has Auto-populate tab where we can select the reference variable on a Dependent question and select Requested For and on Dot walk path select the manager name. Refer below

Screenshot (742).png

3. Now go the Department variable and click on Auto-populate tab and select the Dependent question as Requested For and on Dot walk path select the department. Refer below

Screenshot (743).png

4. Result:

Once selected the Requested For Data will populate as below

Screenshot (744).png

 Hope it will be helpful to you.

Comments
Les1
Tera Guru

If a user is a no role user, is expected behavior that they can't see the auto-populated data? One variable is a reference to catalog item table.  The 2nd variable is a single line text field that i have set to autopopulate on the first field choice.price and for no role users this is not populating but for ITIL or admin user it populates fine. I presume its a security issue but that seems to reduce the effectiveness of the autopopulate feature (at least for this kind of use case).   

how best to handle this? an ACL?

Pavankumar_1
Mega Patron

Hi @Shaik Najma ,

where you are getting sysid ?

In my example I am populating Requested For of manager name on single line text and department on reference.

Erik Stuer
Tera Guru

Can this feature be used to populate a field value from the same record that is referenced with the auto-populate tab? I want the item number to auto-populate in my second variable (within a mrvs) after the user selects the first variable (product). Thank you!

Marlon Dale
Tera Expert

When I do this it won't let me make this variable read only even with UI Policies and/or checking Read only in the variable itself

sulochana
Tera Contributor

@Pavankumar_1 , Thank you mch for sharing the knowledge.

 

Is it possible to select the variable set in the Dependent question under the Auto populate section?

 

 

Thank you.

Pavankumar_1
Mega Patron

@sulochana Yes you can populate any reference data. If your variable set has reference you can use that.

DaniJ
Giga Guru

one issue I am having with the auto-populate option is that the variable does not carry over to the sc_task once the catalog task is created what is the best way to resolve this issue? For example I am auto populating the assignment group based on application selected then I have a flow that creates the sc_task. In the flow I have fields under the create catalog task assignment group and I will select the get catalog variables to bring the group over but since I am using auto-populate on the catalog item that group does not carry over.

Thanks for the help

Srinu Kaviti
Tera Contributor

Hi Danij, Did you solved the issue? i have a similar issue and trying to figure out a solution.

DaniJ
Giga Guru

Still having the issue on having the variable move over it seems that we would need to have a script to move those variables over to the actual task. 

DaniJ
Giga Guru

Please view this post with a sample script that you would have to update: 

 

Re: Display variable in RITM and TASK - Page 3 - ServiceNow Community

Pallavi Shinde
Tera Contributor

Hi,

 

I am trying to populate company name, but it is showing sys id of that particular company. Ho to populate company name ?

purdue
Kilo Sage

Dotwalk to Company Name.

Version history
Last update:
‎04-06-2023 09:21 AM
Updated by:
Contributors