title: Assign value to array from plsql block
body: <p>I have the following code in Oracle Forms detail block</p>
  
  <pre><code>BEGIN
  v_product_no := :detail_block.product_no;
  Go_block('detail_block');
  first_record;
  --some if condition
  WHILE :SYSTEM.last_record != 'TRUE' LOOP        
  next_record;     
  if(:detail_block.product_no = v_product_no) then  
   -- other condtions
  
  end if;
  
  END LOOP;
  </code></pre>
  
  <p>I would like to store <code>v_product_no</code> into a some kind of collection object so that I could compare with value of <code>:detail_block.product_no</code>. </p>
  
  <p>How can I do this?</p>
  
  <p><strong>Edit 1</strong></p>
  
  <p><code>product_no</code> will have values such as <code>K1BATTERY</code>, <code>K2BATTERY</code>, <code>ZCATBATEERY</code> etc.
  So if <code>K1BATTERY</code> is same as <code>:detail_block.product_no</code> then proceed with next condition</p>
  
  <p><strong>Edit 2</strong></p>
  
  <pre><code>Go_block('detail_block');
  v_product_no := :detail_block.product_no;
  v_products(v_product_no) := 1;
  
  first_record;
  
  WHILE :SYSTEM.last_record != 'TRUE' LOOP            
  
      if(v_products.exists(v_product_no)) then
          alert('duplicate');  
              end if;     
      END LOOP;
  
  END if;   
  </code></pre>
  
  <p><strong>Edit 3</strong></p>
  
  <pre><code>Go_block('detail_block');
  v_product_no := :detail_block.product_no;
  v_products(v_product_no) := 1;
  
      first_record;
  
      -- condition 
  
  
      WHILE :SYSTEM.last_record = 'FALSE' LOOP    
          next_record;        
          v_product_no := :detail_block.product_no;
          if(v_products.exists(v_product_no)) then
              alert('duplicate'); 
               else
        v_products(v_product_no) := 1; 
  
              end if;
  
          END LOOP;
  
      END if;
  </code></pre>