Home » Developer & Programmer » Forms » insert into every record value from lov in Oracle forms
insert into every record value from lov in Oracle forms [message #188426] Fri, 18 August 2006 09:00 Go to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

I have a table "TableA" it contains 3 fields ItemA, ItemB, Org_Id displayed 20 times, I also have a LOV where use can pick Org_id, my question is how can i automatically populate Org_id for each record once user finishes inserting values for ItemA and ItemB.
Re: insert into every record value from lov in Oracle forms [message #188495 is a reply to message #188426] Fri, 18 August 2006 14:26 Go to previous messageGo to next message
rampratap
Messages: 50
Registered: November 2004
Location: New Delhi
Member

Hi,

1.Make your LOV's property " Automatic Diaplay = yes"
2. set property for the item on wich this lov is attache
"validate from list = true"

These two hopefully will solv your problem

Re: insert into every record value from lov in Oracle forms [message #188503 is a reply to message #188495] Fri, 18 August 2006 15:44 Go to previous messageGo to next message
deahayes3
Messages: 203
Registered: May 2006
Senior Member

Thanks for responding, unfortunately it did not fix my problem
I did the following as a quick fix, hopefully someone can tell me a easier way to do this.
for loop_table in 1.. last_rec loop

IF cur_itm = frs_itm THEN
Previous_Record;
if :org_id is null then
:org_id := :global.org_id;
end if;

ELSE
Previous_Item;
END IF;

end loop;
Re: insert into every record value from lov in Oracle forms [message #191561 is a reply to message #188426] Thu, 07 September 2006 02:21 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?
You say

how can i automatically populate Org_id for each record once user finishes inserting values for ItemA and ItemB.

Do you have a table that already contains ItemA and ItemB values? Is the Org_id field a database or a non-database field?

If non-database then use the Post-Query trigger to populate it during retrieval and a When-Validate-Item trigger on each of ItemA and ItemB so that when BOTH fields are populated you retrieve the Org_id from the database.

David
Previous Topic: Installation Problem & Installation (merged)
Next Topic: update in master-detail form & FORMS 10g master-detail (merged)
Goto Forum:
  


Current Time: Sun Dec 08 19:08:24 CST 2024