In the Queue screen we want numeric value
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 07:55 PM
Hi All,
var recordIds = input.controller, kioskNames = [];
// gs.addInfoMessage('List of Interaction SysIDs: ' + recordIds);
// gs.addInfoMessage('Length of the recordIds: ' + recordIds.length);
for (i = 0; i < recordIds.length; i++) {
var grInt = new GlideRecord('interaction');
grInt.addQuery('sys_id', recordIds[i]);
grInt.query();
while (grInt.next()) {
var grReason = new GlideRecord('wu_m2m_location_queue_reason');
grReason.addQuery('wu_reason.reason', grInt.short_description);
grReason.addQuery('wu_location_queue', queueId);
grReason.query();
if (grReason.next()) {
gs.addInfoMessage(grReason.sys_id);
var grLabel = new GlideRecord('label_entry');
grLabel.addQuery('table_key', grReason.sys_id);
grLabel.query();
if (grLabel.next()) {
// gs.addInfoMessage('For ' + grInt.short_description + ', the Kiosk Name is ' + grLabel.label.getDisplayValue().toString());
kioskNames.push(grLabel.label.getDisplayValue().toString());
}
}
}
}
gs.addInfoMessage("List of Kiosk Names: " + kioskNames);
}
The above script is working fine ,in the var =' recordIds' series of sys_id , it may be 3 records or 7 records or 10 records anything and it will come dynamic .Array :-"kioskNames "we are getting multiple values "tech majlis , People Exp , Office Management ".
assume that if there 6 tech majlis records are , 3 office management and 3 people Exp. than if the first tech majlis is coming than it should display 001 , second Record tech majlis records 002 ,third tech majlis 003, fourth record Office management it should 001 , fifth Record People Exp it should display 001 , if the six record is Tech majilis than it should be 004 like this i want to store this value (001 , 002 Like than ) display in the Queue screen .
Can anyone help me the code .
Thanks ,
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 08:28 PM
@Ankur Bawiskar :can you help me to build the script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2024 10:17 PM
@Prana Krushna Can you help me on this script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2024 01:58 AM
sorry we are not able to get what script you require
what did you debug and what's your analysis?
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader