Pull sys_ids from selected records in a list via UI action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2021 10:26 AM
I have a List Banner Button UI action, and I would like it to pull each individual sys_id from the records that the user selects. (See Below)
What should the script look like for this UI action? I need to pull each sys_id individually (Once I figure out how to do this I will be using the sys_ids for GlideRecords, but for now I just want to be able to pull the selected records sys_id)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2021 10:37 AM
The UI Action will run for each row individually. "Current" is the object available for each record, so current.sys_id will get you the selected row's ID.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2021 10:58 AM
you can get selected records 'sys id' using g_list.getChecked()
var selSysIds = g_list.getChecked();
var sysIdList = selSysIds.split(',');
alert('status - '+selSysIds);
for (var i=0;i<=sysIdList.length;i++)
{
alert('i is '+i);
alert('sys id is '+sysIdList[i]);
}
please let me know if its helpful or need more help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2024 12:55 AM
Hi,
The client checkbox should be checked?
I try to use the g_list.getChecked() with client=true or client=false.
without any sucssess.