2 Replies Latest reply on Nov 15, 2017 8:39 PM by John Snyders-Oracle

    How to set item value in javascript?


      I'm using apex 5.1.3 and universal theme.


      I'm using apex item in a classic report to enter some data.


      'SELECT c002 segment_no, segment_name, '

                     APEX_ITEM.text(3,c007,15,null, 'onchange="OnSegChange(this)" id="fPS07''||seq_id) seg_code,

              FROM apex_collections

              WHERE collection_name = '<name>'


      below is what I normally use to update the value of an item back to the collection

      function OnSegChange(cb){

      var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=OnChangeCollection',$v('pFlowStepId'));



      var gReturn = get.get();

      get = null;


      In this case I need to pass the data and change it back if needed example I need to pad it to left or right.


      My question is how do I change the value?


      I know I can use $s or apex.item to set the value but in this case I cannot access it using item name.


      Is there something like cb.setValue?