title: How to populate a text item from Oracle table using Oracle forms (Middleware) 11gR2
body: <p>I am using Oracle with Oracle Forms builder (Middleware) both 11gR2. I am creating a system for purchasing records. I have the following 2 tables.</p>
  
  <pre><code>(a) product (master) : prodid(PK), prodname ...... etc.
  (b) purchase (detail) : prodid(FK), quantity, ...... etc.
  </code></pre>
  
  <p>My plan: All the product details will be in the product table. purchase table will be used only to input purchase information. This table can't input any new product. If any new name, that info will have to be input into product table first. This way I can reduce duplicate names.
  Now I am having difficulties relating to prodname (name of the product) column in the form.</p>
  
  <p>I created forms using the purchase table only. This table does not have the prodname (because I put this field in product table) column. But during data entry, they need to see the product name !
  So I created text item (tabular, database - no). Then I created LOV, attached to text item, input the prodid in prodid field in the form. LOV part is fine.</p>
  
  <p>I run the form. click the text item, LOV appears, select a name, click OK. product name, product id, etc. appears in their fields as it should be. LOV is working fine. Now I can only input data but having difficulties updating. I mean if I input a name (LOV) in the text item, press execute query, shows records from the database but names in the text item disappear. Since the name is not here, it's not comfortable to update.</p>
  
  <p>I think LOV is not the good idea here. May be I need to use PL/SQL in a trigger somewhere.
  But I could not figure it out. I searched google but no luck. Is there anyone who can give me any idea or some example code/trigger please.</p>