Adding a column in table Optional
If you have already column to update or not required to update in the current table then you can skip this step.
Code: Select all
alter table "WKSP_ERPSTUFF"."EMP" add ("SELECTION" VARCHAR2(1));
Code: Select all
select EMPNO,
apex_item.checkbox(1,EMPNO) as SELECTED,
ENAME,
JOB,
MGR,
HIREDATE,
SAL,
COMM,
DEPTNO,
STATUS,
selection
from EMP
Code: Select all
<input type="checkbox" id="checkAll" >
Code: Select all
DECLARE
v_empno NUMBER;
BEGIN
-- Process only selected checkboxes
FOR i IN 1..apex_application.g_f01.COUNT LOOP
v_empno := apex_application.g_f01(i);
update emp set selection = 'Y' where empno = v_empno;
END LOOP;
END;
Code: Select all
update emp set selection = null;
Code: Select all
$(document).on('click', '#checkAll', function () {
$('input:checkbox').prop('checked', this.checked);
});