Need to populate Asset Serial number in service catalog variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2023 09:49 PM
Hi All,
Need to populate requested for assets in lookup variable in catalog.
we have a requested for variable and we need to get the value of requested for Assets serial number from the (Alm_hardware ) table to populate in (serialnumber_varible ) lookup select box in catalog item.
Please suggest.
Thank you all.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2023 02:15 AM
I don't think script include is required.
it should work fine as per what I mentioned.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2023 11:30 PM - edited 07-05-2023 11:42 PM
Hi @Ankur Bawiskar ,
Its working fine when remove the &colon . Now its filtering dedicated assets;
And then Based on serial_number i need to populate the CI name in Single line text variable.
I used below callback function but its not fetching any value its showing undifine.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
{
var mn = g_form.getReference('existing_serial_numberr', callback);
}
}
function callback(mn) {
alert('Value='+ mn.display_name);
g_form.setValue('CI', mn.display_name);
}
Please suggest
Thanks for your support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2023 01:59 AM
thank you soo much sir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-05-2023 02:02 AM
To populate the "serialnumber_variable" lookup select box in the catalog item, you can retrieve the value of the "requested for" Assets serial number from the "Alm_hardware" table. By fetching this value, you can dynamically populate the select box with the available serial numbers for the requested assets.