How do i pick rows which are checked in a related list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 02:47 PM
Hi
Am trying to build a UI Action where in i need to pick the checked rows in a related list of form( eg pick the rows which are checked in asset related list in a incident form), any insights on if this can be done?
Thanks,
Anirudh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 03:10 PM
Hello Anirudh,
I don't have an instant answer for you. But you can check the OOTB UI action scripts for ex : Delete UI action only deletes the selected record in list view.
I hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 03:28 PM
In your UI action, you can use "List Choice" option to capture selected rows in list.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2017 12:16 AM
Hi Anirudh,
Have a "List choice" UI action and make it client side by clicking the checkbox for client. in onclick field have a method name such as getSelected().
In script section add this script
function getSelected(){
// this gives an array of sys_ids of the records which are checked and then you can do whatever you want with these sys_ids
var selected = g_list.getChecked().split(',');
alert(selected);
}
This works on normal table also and wherever you are having this table as related list
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2020 01:43 PM