I was searched for this problem, but I didnt find a solution.
I have a classic report with 16 checkbox-columns. This is a part from the select-statement:
from prueffragen pf,
where pf.frage = f.id
If the column-value for an answer-field (here named as "ja", "nein", "neiu") is the value of the ID-column the checkbox is ticked. I thought: "Well done!"
But saving of the values to the tables dosent works. This is a part of the procedure to save the values for the answer-field "ja":
FOR i in 1..APEX_APPLICATION.G_F02.COUNT LOOP
SET ja = APEX_APPLICATION.G_F02(i)
WHERE id = to_number(APEX_APPLICATION.G_F02(i));
It seems that I can't read the value for the new ticked checkbox. Maybe because the page is not submitted. As example I have 2 checked ckecboxes and I check one checkbox more and try to save it, I can see that the array has 3 entries (only the checked checkboxes are in the array), but the value for the new checked checkbox is 0 and has not stored the primary key-field-value.
What can I do?
Please I need help for this, its urgent. I have to finish this application this year.
If it is urgent, maybe you hire someone to do the job.
This is volunteer forum and ppl use their time for free to help others.
What is your APEX version?
Create example about problem in apex.oracle.com.
Small pieces of code do not help at least me to understand what you have already done or try archive.
Working example help us to understand problem and what you have already done.
I have create a sample-application in apex.oracle.com, that shows this problem.
Unfortunately, only workspace name is not enough.
I'm not working for Oracle or have admin access to instance.
So only workspace name do not help me login and see your application code.
If it is possible, please create developer user to your workspace and share user name and password.
For other people here the whole code to create a classic report with updateable checkboxes.
1. Create a classic report with a query like this:
select APEX_ITEM.TEXT(1, ID) as ID,
FRAGE as FRAGE,
APEX_ITEM.CHECKBOX(2, ID, null, JA) as JA,
APEX_ITEM.CHECKBOX(3, ID, null, NG) as NG
order by ID
2. Edit the Report Attributes
- Set for all columns the property "Display as" to "Standard Report Column"
- For the column ID you can set the property "Show column" to "No"
3. Create a PL/SQL-process with a code like this:
-- Reset all Checkboxes
update PRUEFUNG set
JA = 0,
NG = 0;
-- Set checked Checkboxes for field JA
for i in 1..APEX_APPLICATION.G_F02.COUNT loop
set JA = APEX_APPLICATION.G_F02(i)
where ID = to_number(APEX_APPLICATION.G_F02(i));
-- Set checked Checkboxes for field NG
for i in 1..APEX_APPLICATION.G_F03.COUNT loop
set NG = APEX_APPLICATION.G_F03(i)
where ID = to_number(APEX_APPLICATION.G_F03(i));
4. Create a button that Submit the page and execute the PL/SQL-process