Variable Set With Auto Populate Not Working in Order Guide

lpruit2
Kilo Sage

Greetings all,

 

I have a Variable Set that contains four Variables: One Reference to the User table, and three Single-line text Variables that auto-populate off of the User Reference field. The three single-line text fields grab various contact information (ex. phone, email, etc.). The issue I am having is that if I load the Record Producer directly, the auto-complete functionality works without any issue. However, if I navigate to the same Record Producer by first going through an Order Guide that is mapped/routed to to the Record Producer, the auto-complete functionality does NOT work. The first User Reference field will auto-populate but the three single-line text Variables do NOT auto-populate and remain empty.

 

Finally, when I'm in the Order Guide-to-Record Producer view and I CHANGE the value of the User Reference field, the three single-line text fields DO finally auto-populate. 

Has anybody else experienced this loss of functionality with navigating to a Record Producer through an Order Guide with a Variable Set that has some auto-population? 

1 ACCEPTED SOLUTION

@lpruit2 

I tested it and it seems to be a bug if the user reference field is populated through default value field.

Workaround : Instead of populating the user reference field using default value, use an onLoad client script 

g_form.setValue('user_reference_field', g_user.userID);

 

This way it is working for both Cat Item and order guide.

 

You can create a HI Case with ServiceNow and use the above workaround until then.

 

Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth

View solution in original post

7 REPLIES 7

SumanthDosapati
Mega Sage

@lpruit2 

There can be few reasons on how it is configured. Can you answer below 2 questions:

  1. How is the user reference field value set onLoad? (Default value or client script or something else)
  2. How are the remaining three fields populated? (OnChange client script or something else etc)

Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth

@SumanthDosapati  currently, there are no onLoad or onChange Client Scripts. Within the three Single Line Text Variables, there is a tab called "Auto-populate" where you can select another Variable (in this case the User Reference field) and you select the Dot walk path that you wish to display when the auto population takes place. 

How is the user reference field set on load? Default value or onLoad client script?

Ah, excellent question. Apologies for not providing that up front. The User Reference field has a default value that is using the .getUserID() method.