0

currently i am facing a problem on how to update a single row in an interactive grid. My Page contains multiple IGs and I have to use PL/SQL to update the rows.

Automatic Row Processing didn't work properly. Attached you can find the IG and the code I wrote. I don't know how to select the correct row with the rowid.

I have 4 columns in my table, note that I don't have a column ROWID. Any help is appreciated.

begin  
 case :APEX$ROW_STATUS  
 when 'I' then -- Note: In EA2 this has been changed from I to C for consistency with Tabular Forms  --I for Insert
     insert into poc_sofortmassnahme ( beschreibung_sofort, bearbeiter_sofort, zieldatum_sofort, wirksamkeit, sof_id )  
     values ( :BESCHREIBUNG_SOFORT, :BEARBEITER_SOFORT, :ZIELDATUM_SOFORT, :WIRKSAMKEIT, :P40_SOFORT_ID)  
     returning rowid into :ROWID;  
 when 'U' then  -- U for Update
     update poc_sofortmassnahme  
        set BESCHREIBUNG_SOFORT  = :BESCHREIBUNG_SOFORT,  
            BEARBEITER_SOFORT = :BEARBEITER_SOFORT,
            ZIELDATUM_SOFORT = :ZIELDATUM_SOFORT,
            WIRKSAMKEIT = :WIRKSAMKEIT
      where rowid  = :ROWID;  
 when 'D' then  -- D for Delete
     delete POC_SOFORTMASSNAHME  
     where rowid = :ROWID;  
 end case;  

end;

Sincerly,

EE

Jon Heller
  • 34,999
  • 6
  • 74
  • 132
wayne
  • 81
  • 1
  • 15
  • Please write the code in code block and don't post it as a picture. – Geshode Jul 20 '18 at 06:14
  • I'm not sure what you're trying to do. Are you trying to update your table based on the changes the user has made to the IG, or are you trying to change one of the values displayed in the IG? – eaolson Jul 20 '18 at 23:34
  • @eaolson I am trying to update the table based on the changes the user has made – wayne Jul 23 '18 at 06:03

0 Answers0