0 Replies Latest reply: Mar 13, 2013 1:43 PM by Teku RSS

    Using APEX_ITEM.MULTI_ROW_UPDATE along with APEX_ITEM.CHECKBOX

    Teku
      Hi,

      I am stuck working with APEX_ITEM.MULTI_ROW_UPDATE process for the past 2 days.
      I don't see any working examples in forum as well to update APEX_ITEM.CHECKBOX values using the APEX_ITEM.MULTI_ROW_UPDATE process.

      My updateable query is as below :
      select APEX_ITEM.HIDDEN(1,INST_ID) ||
             APEX_ITEM.TEXT(2,INST_NME,20,200) AS INST_NME,
             APEX_ITEM.TEXT(3,INST_CTY_TXT,10,50) AS INST_CTY_TXT,
             APEX_ITEM.SELECT_LIST_FROM_LOV(4,ST_CDE,'STATES_LOV',NULL,'YES','ZZ','~ Select ~') AS ST_CDE,
             APEX_ITEM.MD5_CHECKSUM( INST_NME,
                                     INST_CTY_TXT,
                                     ST_CDE,
                                     LGE_IND
                          ) || APEX_ITEM.CHECKBOX(5,LGE_IND,NULL,-1) AS LGE_IND
       from  TEST
      Note: I am using -1 for checked value of checkbox.
      My update process is
        BEGIN
          APEX_ITEM.MULTI_ROW_UPDATE('#OWNER#:TEST:INST_ID,1:,|INST_NME,2:INST_CTY_TXT,3:ST_CDE,4:LGE_IND,5');
        END;
      Now when I update any field and Save the changes I get the error below :
        ORA-20001: Error in MRU: row= 1, ORA-01403: no data found, update 
      If I use textbox instead of checkbox and write the code as below it works perfect.
      select APEX_ITEM.HIDDEN(1,INST_ID) ||
             APEX_ITEM.TEXT(2,INST_NME,20,200) AS INST_NME,
             APEX_ITEM.TEXT(3,INST_CTY_TXT,10,50) AS INST_CTY_TXT,
             APEX_ITEM.SELECT_LIST_FROM_LOV(4,ST_CDE,'STATES_LOV',NULL,'YES','ZZ','~ Select ~') AS ST_CDE,
             APEX_ITEM.MD5_CHECKSUM( INST_NME,
                                     INST_CTY_TXT,
                                     ST_CDE,
                                     LGE_IND
                          ) || APEX_ITEM.TEXT(5,LGE_IND,5,10) AS LGE_IND
       from  TEST;
      
      
        BEGIN
          APEX_ITEM.MULTI_ROW_UPDATE('#OWNER#:TEST:INST_ID,1:,|INST_NME,2:INST_CTY_TXT,3:ST_CDE,4:LGE_IND,5');
        END;
      If anyone see what is wrong that I am doing please help me out here.
      Your help is greatly appreciated.

      Thanks,
      Raj.