Classic report and would like to add a column with a checkbox so the user can select multiple rows and perform an action on all selected rows.
to add a checkbox to your classic report use apex_item.checkbox API function like this:
- select
- APEX_ITEM.CHECKBOX(p_idx=>1, p_value=>DEPTNO) as select_dept,
- DEPTNO as DEPTNO,
- DNAME as DNAME,
- LOC as LOC
- from DEPT
Then you can access checked values (for example in a page process)
- declare
- v_deleted_depts number := 0;
- begin
- FOR i in 1..APEX_APPLICATION.G_F01.count
- LOOP
- v_deleted_depts := v_deleted_depts + 1;
- delete from dept where deptno = APEX_APPLICATION.G_F01(i);
- END LOOP;
- :P1_DEPTCOUNT := v_deleted_depts;
- end;
Thanks for sharing!
ReplyDelete