How to store the check box values instantly without page submit to another Item oracle

310 Views Asked by At

I want to get the checkbox values assigned instantly to an item as ":" separated.

When i select checkbox it should assign the value into an item instantly without submitting the page.

Below Example taken from Google, but i want as the same shown in image

enter image description here

1

There are 1 best solutions below

0
Tony Andrews On

If you define the checkboxes like this in the report SQL:

apex_item.checkbox2(1,null,'class="sel-cbx" data-value="'||empno||'"',empno) as sel

Then a dynamic action on change of jQuery selector 'sel-cbx' can execute this Javascript to maintain the list in the item:

let a = [];
$('.sel-cbx:checked').each(function() {
    a.push($(this).attr('data-value'))
});
$s('P10_EMPNO_LIST',a.join(':'));

(I'm sure there's a neater way to write the Javascript, but it works.)