Variable selectedSysIds will consist of sys_id`s of selected records. To be used from a UI Action (List).
selectedSysIds
var selectedSysIds = g_list.getChecked();
Develop whatever!