How to get variables in catalog item by dot-walk in auto-populate ?

namikoY
Tera Contributor

Can I get variables in catalog item by dot-walk in auto-populate ?

As shown in the attached image, Questions are displayed in the Dot-walk path window in the Auto-Populate tab, but is it possible to get variables  using this?

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@namikoY 

if it's a reference field then you can dot walk to multiple levels.

As per your screenshot it's not possible

Your 1st variable is referring to which table?

what's your business requirement?

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

Community Alums
Not applicable

Hi @namikoY 

we cannot directly use Dot-Walk to reference variables in the Auto-Populate tab of a catalog item.

instead, we can Use a Catalog Client Script(either onLoad, onChange, or onSubmit) to populate variables dynamically.

e.g. 

function onLoad() {
    var previousFieldValue = g_form.getValue('your_field_name');
    g_form.setValue('target_variable', previousFieldValue);
}