I need to set value in reference variable based on other reference variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2022 03:40 AM
Hi All,
I need to set value in reference variable based on other reference variable.
Below is the client script in log i can see the value but it's not set in reference varible.
function onChange(control, oldValue, newValue, isLoading) {
if(isLoading || g_form.getValue('device_name')!= '')
{
var mn = g_form.getReference('device_name', callback);
}
}
function callback(mn) {
g_form.setValue('device_serial', mn.serial_number);
alert('Value='+ mn.serial_number);
}
Please suggest.
Thanks all.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2022 05:10 AM
Hi. If my answer has helped you resolve your issue, Please mark Correct and Helpful. This way, other users may also benefit from the thread. Thanks!
Martin Ivanov
Community Rising Star 2022
Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024