0
votes

I want to generate report from table and create there checkboxes in line with every row and connect them with action activated by button or something like that. For example list of services for a client and after button is pressed block in pl/sql would return calculation and save [checked]services ordered by client in prepared table. But i don't know how to generate checboxes in rows and chow to use checks to calculate and saving what to look for and where.

1

1 Answers

0
votes

You can use the apex_item.checkbox function:

select apex_item.checkbox(1,empno) cb, ename
from emp;

When the page is submitted, an array apex_application.g_f01 will be filled with the empno values of the checked rows. So in a submit process you can do something like:

for i in 1..apex_application.g_f01.count loop
    insert into mytable(empno) values (apex_application.g_f01(i));
end loop;

There are 50 arrays like this g_f01, ..., g_f50, corresponding to the number passed as the first parameter to apex_item.checkbox.