Glide List Type Bulk Update values in a field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello Experts,
Any one has done bulk uploads of data in a field of type= Glide List.
We need to add more than 200 values and doing manually looks not a better solution.
We need to add in Table = "discovery_port_probe" to field = "Triggered by services" around 200 entry from Table=cmdb_ip_service
Anyone has done via scripting ? OR not sure Import sets .
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @Nisha30
Using Fix script/background script , you can run.
Sample high level code
var ipSerGr = new GlideRecord('cmdb_ip_service');
// Query your 200+ IP Services
ipSerGr.query();
var sysIdArray = [];
while (ipSerGr.next()) {
sysIdArray.push(ipSerGr.sys_id.toString());
}
var combinedSysIds = sysIdArray.join(',');
var probeGr = new GlideRecord('discovery_port_probe');
probeGr.addQuery('name', 'YOUR_PROBE_NAME'); // Replace with specific probe criteria if needed
probeGr.query();
while (probeGr.next()) {
probeGr.setValue('triggered_by_services', combinedSysIds);
probeGr.update();
}
gs.info("Glide List successfully populated on discovery_port_probe.");
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Thankyou @Tanushree Maiti
the script works and i can see the SYS_ID of services in log , However when i update it shows success but they are not added to the field .
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @Nisha30
Check the field type of triggered_by_services .
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
59m ago
Its Glide List
Thanks