title: How to wait on a refresh of a classic report region before checking the length of the report?
body: <p>Im using 18.2.0.00.12 ,  the default oracle apex client they provide for free.</p>
  
  <p>My issue is that my classic report region is refreshing after I make a dynamic check for the length of the report.<br>
  My main page is a classic report with a list of values.  There is a button to add a value in a modal dialog.  After the element is added in the modal, the modal closes and a dynamic action is triggered on my main page to refresh the report  (this is working).  My issue is that after I refresh the report,  I make another Javascript call (see below) in order to check the length of the report.  Based on the result, it either shows/hides a button.</p>
  
  <pre><code>if ($('#report_RC_ATTACH').length &gt; 0) 
  {
  $('#DELETE_ATTACH').show(); 
  } else 
  {
  $('#DELETE_ATTACH').hide(); 
  }  
  </code></pre>
  
  <p>The Static ID for my region is RC_ATTACH.  The static region for my button is DELETE_ATTACH.  Also note,  after the dynamic action finishes, I am able to go into the console, put in the code above and the button show/hides correctly.  I think the issue is that the region is refreshed after the code above is called.   </p>
  
  <p>My question:  Is there a way to delay or wait until the refresh occurs before making the length check?</p>
  
  <p>Let me know if I can provide anymore information.</p>
  
  <p>Thanks,</p>