12 Replies Latest reply: May 18, 2012 7:53 AM by 755501 RSS

    Set Tabular Form Value using Dynamic Action

    755501
      I have a tabular form created using APEX_ITEM.

      ie. APEX_ITEM.SELECT_LIST_FROM_LOV(3,nvl(D.FK_ATTENDANCE_CODE,'%null%')

      I want to use a Dynamic Action to set its value based on the value of a hidden page item.
      I created a Page Item 'P1358_HOLD_ATTENDANCE_CODE' and I can see it getting set to the correct value.

      I tried to create Dynamic Action (Execute Javascript) to set the tab form select list item (f03), but it's not working.

      here is what I tried:

      var row = $x_UpTill(this.triggeringElement, 'TR');
      var otherElement = $('input[name="f03"]', row)[0];
      otherElement.value = $x('P1358_HOLD_ATTENDANCE_CODE').value;

      Any ideas?
      I know as a backup I could set the ID= when creatig the items in the tabular form so all rows are different but I'm hoping the JQuery can do it easier.
      Thanks