Pushing name instead of SysID in XML of Requested Item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 08:43 PM
HI Community,
I have a requirement wherein when a request has been submitted for a specific catalog item, a list collector variable is pushing the value in the XML as sys_id. In the frontend/form, it is showing name. I want to push name as well on the XML so that it is uniform. Is there any way to possibly do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 09:00 PM
Hi @Vee Jay Recana ,
As list collector point to table and show all records from table, that's the reason its showing sys_id of each record. Here in this case, first 3 values are listed as Name Value and last one sys_id. Did you check why first 3 are showing name only instead of sys_id.
-Thanks,
AshishKM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 09:47 PM
They were updated from the Native UI. The sys_id was updated from a catalog item.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-24-2025 09:13 PM
When processing the RITM or the variable in script (e.g., Business Rule, Workflow, Flow Designer), you can split the sys_ids and fetch their display values:
Sample Script :-
var selectedValues = current.variables.your_list_collector; // sys_ids
var ids = selectedValues.split(',');
var names = [];
for (var i = 0; i < ids.length; i++) {
var gr = new GlideRecord('target_table'); // e.g., sys_user if list collector is users
if (gr.get(ids[i])) {
names.push(gr.getDisplayValue()); // get display name
}
}
gs.info("Selected Names: " + names.join(','));