2 Replies Latest reply on May 9, 2014 8:42 PM by TexasApexDeveloper

    Cascading POPUP LOV in a tabular form


      I am trying to get a cascading POPUP LOV to work in tabular forms. I can get cascading select lists to work with the code below but it does not work with POPUP LOVs.


      One complication with POPUP LOVs in tabular forms is that a hidden field is created with the return value. I can handle that when the POPUP LOV is not cascading but it causes trouble when cascading.


      Another complication with POPUP LOVs is that the APEX_ITEM functions to create them do not set the id when you pass it. You can send an id as an attribute but then the hidden field is not in sync with the POPUP field. In fact it looks like all the hidden LOV fields have the same id of fnn_0000.


      This code works for select lists.


      function f_set_casc_sel_list_item(parentField,ChildField){

        var l_rec_nbr = $x(parentField).value;

        var l_Select = document.getElementById(ChildField.id);


          apex.server.process( 'GET_UPDATED_LOV_STRING',


                               {dataType: "xml",

                                success: function(pData) {

                                           var l_xmlDoc = pData;

                                           var l_Count = l_xmlDoc.getElementsByTagName("option").length;

                                           l_Select.length = 0;

                                           for(var i=0;i<l_Count;i++){

                                             var l_Opt_Xml = l_xmlDoc.getElementsByTagName("option")[i];

                                             appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),









      function appendToSelect(pSelect, pValue, pContent) {

         var l_Opt = document.createElement("option");

         l_Opt.value = pValue;



             l_Opt.innerText = pContent;