11 Replies Latest reply: Dec 19, 2013 3:04 AM by pinnom RSS

    Cant save checkbox-states in classic report

    pinnom

      Hello,

      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:

       

      select

      APEX_ITEM.TEXT(1,pf.id) id,

      f.frage,

      APEX_ITEM.CHECKBOX(2,pf.ja,null,pf.id) ja,

      APEX_ITEM.CHECKBOX(3,pf.nein,null,pf.id) nein,

      APEX_ITEM.CHECKBOX(4,pf.neiu,null,pfid) neiu,

      [...]

      from prueffragen pf,

             fragenkatalog f

      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

          UPDATE prueffragen

          SET ja = APEX_APPLICATION.G_F02(i)

          WHERE id = to_number(APEX_APPLICATION.G_F02(i));

          commit;

        END LOOP;

       

      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?

       

      Kind regards,

      Mark