New in Utah! Auto-populate variable based on a reference

Auto-populate a variable based on a reference type variable on the form

Define a relationship between two questions in Catalog Builder (for example, fields such as Requested for and Manager) without the need to script. The value of the dependent question is auto-populated when the value of the initial question is selected or changed.

I’ve been waiting for this for longer than I knew ServiceNow existed!

So far, we have had to create ad-hoc Client scripts to handle this common requirement. And there was no perfect solution.

We know the best practice is to use GlideAjax because it’s more efficient.

Efficiency is good, we don’t want our users to waste their valuable milliseconds.

But the syntax of GlideAjax is not very developer-friendly. I can’t blame people for not always following it.

I dreaded it every time, even after creating a generic Script include to handle the server side of it.

Complexity /
Response time
GlideRecord✅ Low⛔️ High
getReference🟡 Medium🟡  Medium
GlideAjax⛔️ High✅ Low
Auto-populate💚 None!💚 Great!

Only in Catalog Builder?

No! It’s also available in the good old classic interface!

And dot-walking is allowed!

Note: You might need to add the tab and fields.

Did you mention better performance?

Full disclosure: I haven’t tested it thoroughly, but it looks good based on the requests and responses.

Only one request is sent to the server even if you have multiple dependent questions.

In my tests, I created one dependent question for Manager’s name and another one for the Employee number.

{"sysparm_dynamic_target_fields": "ee1c8e4247746110985d2646926d43d6,bd49c64e47346110985d2646926d4364",
"sysparm_dynamic_record_id": "6816f79cc0a8016401c5a33be04be441"}Code language: JSON / JSON with Comments (json)

Plus, you only receive the relevant data in the response.

        {"value": "12345", "displayValue": "12345"},
        {"value": "Joe Employee",
        "displayValue": "Joe Employee"}
}Code language: JSON / JSON with Comments (json)


Service Catalog release notes for Utah