7 Replies Latest reply: Oct 9, 2013 4:59 AM by NavneetU RSS

    Change value of one column (LOV List) corresponding to the value selected in another column in Tabular form

    NavneetU

      Hi Experts

       

      I have a requirement where in a Tabular form, I need to populate/update the value of one column (Category_name) according to the value selected in another column (category_group) which is also a select LOV list. I am trying to implement it using AJAX/jquery. Here is the code I am using.

       

      1. Created a dynamic action with java script code as

      {code}

      $('td[headers="Category Group"] select').change(function(){

      var that = this;

      $.post('wwv_flow.show',

             {"p_request"      : "APPLICATION_PROCESS=get_category",

              "p_flow_id"      : $v('pFlowId'),

              "p_flow_step_id" : $v('pFlowStepId'),

              "p_instance"     : $v('pInstance'),

              "x01"            : $(this.triggeringElement).val()

              },

              function(data){

                 var eJob = $(that).closest("tr").find("td[headers='Category'] input");

                 eJob.val(data);

              },

              "text"

            );

      });

      {code}

       

      2. Created a Application Express Event..AJAXCALLBACK

       

      {code}

      DECLARE

         l_category category_master.category_name%TYPE;

      BEGIN

         SELECT category_name

         INTO l_category

         FROM category_master

         WHERE category_group = apex_application.g_x01;

       

         htp.p(l_category);

      EXCEPTION WHEN no_data_found THEN

         htp.p('');

      END

      {code}

       

      But its not working for me.

       

      Can someone please help me out in implementing this?

       

      Thanks

      Navneet