1 Reply Latest reply: Oct 30, 2013 11:37 AM by Mark_B_1123581321 RSS

    How do I set an Apex mulri-row reports form value for the specifc current row using Javascript?


      I have a multi-row region based on a table in which I have two particular columns of interest.  The first has an LOV defined for which I have set up a pick-list of codes associated with the item's status as "OK" or having some problem, for which there are a small number of set codes associated.  Most rows will be OK, but when there is a problem, the pick-list will be used.


      When that pick list has been used, there is an optional "comments" column that can be filled in.  I want my screen to dynamically enable/disable a pushbutton that links to the comment based on the code.  This being row-based, the push-button needs enabling or disabling by row, not as a whole "conditional column".  That bit is ok, I think, but I don't know and can't find the syntax for how within the javascript onchange function I set the current row value for a different column to the one that triggered it.


      My header function (that doesn't work) is going to be something like this (where the status column LOV having a value = 6 means "OK").  Note I'm using alert for a debug mechamism.  The $s line is my failed attempt to set he column value, here with a hard-coded string "Changed COMMENTS":


      <script type="text/javascript">

      function doActivateButton(object)




          alert('It is not 6!');

          $s('#COMMENTS','Changed COMMENTS','Changed COMMENTS',TRUE);




          alert('It is 6, you know!');




      Ideally, I want any existing comments blanked if the user picks "OK" (6) as the new status, whereas for debug above I'm setting the hardcoded debug string.  You will probably also note I realise I haven't properly understood the purpose of the third parameter in the $s API.


      (This is a reports region, by the way.  A detail block, in forms-speak, with a header block above it.)


      Thanks for any assistance.