3 Replies Latest reply on Feb 13, 2013 11:41 PM by VANJ

    Dynamic action - Alert message

      APEX 4.2.1

      1. Classic report region with apex_item.radiogroup() to select a row
      2. Button to submit the page, request = R1

      UI pattern - When radio button is clicked and page submitted using button R1, follow should happen

      1. Lookup value from database based on value of clicked on radiobutton
      2. Compare with value of a page item P1_X. Page items has currency formatting, needs to be stripped before comparing numeric value
      3. If values don't match, popup alert message

      Sounds simple enough for a dynamic action but I couldn't think of anything simpler than creating a DA
      1. When = Click on Button R1
      2. Execute Javascript code to set hidden page item P1_ID to *$("input[name=f01]:checked").val()*
      3. Set Value to retrieve value from database and set another hidden page item P1_Y
      4. Another Javascript snippet to do
      if ($v('P1_X') !== $v('P1_Y')) alert('whatever');
      To-do: strip out currency formatting before comparing the values
      5. Finally, submit the page to continue page processing.

      All this seems too cumbersome and un-APEXy. Is there a easier, declarative way to do this?