I have created one intractive report with checkbox, here in report if i have not selected any checkbox then it should through errorlike "select atleast one checkbox" in oracle apex
Kindly assist
CodePudding user response:
Suppose you have an interactive report on table emp with this as query:
select EMPNO,
ENAME,
JOB,
MGR,
HIREDATE,
SAL,
COMM,
DEPTNO,
APEX_ITEM.CHECKBOX(1,empno) checkbox
from EMP
Add a button to the with action "Submit Page"
Create a validation of type "Function Body (returning Boolean)" with source code
DECLARE
BEGIN
FOR i IN 1..APEX_APPLICATION.G_F01.COUNT LOOP
RETURN true;
END LOOP;
RETURN false;
END;
and error message "At least one checkbox must be checked"
That is all there is to it.