3 Replies Latest reply: Nov 14, 2012 8:22 PM by Yogi RSS

    How to update Manual Tabular Form

    Yogi
      Hi There,

      I have a manual tabular form on an apex 4.1 page and I would like to update the records when I click on a submit button.
      Below is the query of the form:

      ------------------------------------------------------------------------------
      -----------------------------------------------------------------------------


      SELECT '#ROWNUM#' sno,
      apex_item.checkbox(01, wo_line_id) del,
      apex_item.hidden(02,wo_line_id)||apex_item.hidden(03,wwv_flow_item.md5(adjusted_amount)) wo_line_id,
      apex_item.text(17, adjusted_amount, 10, 10,'onchange="set_innerHTML(this);"','f17_' ||'#ROWNUM#') adjusted_amount
      from work_order_lines
      where wo_header_id = :P302_WO_HEADER_ID;

      ------------------------------------------------------------------------------
      -----------------------------------------------------------------------------


      Below is the code in the "After Submit" process

      ------------------------------------------------------------------------------
      -----------------------------------------------------------------------------

      DECLARE
      v_header_result VARCHAR2(1);
      v_line_result VARCHAR2(1);
      v_error_count NUMBER:= 0;
      BEGIN




      FOR i in 1..apex_application.g_f02.COUNT
      LOOP
      BEGIN

      update_wo_lines_prc(:APP_USER
      ,:P302_WO_HEADER_ID
      ,APEX_APPLICATION.G_F02(i)
      ,APEX_APPLICATION.G_F17(i)
      ,v_line_result);
      END;

      END LOOP;


      COMMIT;


      END;

      ------------------------------------------------------------------------------
      -----------------------------------------------------------------------------


      Somehow the LOOP doesn't get executed.
      Please advise.


      Thanks
      Yogi