Home » Developer & Programmer » Forms » how can i populate record using LOV value (form 6i,win XP)
how can i populate record using LOV value [message #496719] Wed, 02 March 2011 02:06 Go to next message
maddyd2k
Messages: 24
Registered: November 2010
Junior Member
Create a form based on the following output use EMP Table

Create a non Database Block i.e Control Block----> Dept No


Create a Database Block -EMP
Create an LOV for the Dept no from dept table.
For the Current Dept No . Populate the Employee Records
Re: how can i populate record using LOV value [message #496723 is a reply to message #496719] Wed, 02 March 2011 02:19 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
There are a few options.

One is to create a PRE-QUERY trigger that'll contain
:emp.deptno := :control_block.deptno;


Another one is to set "detail" block's ONETIME_WHERE (using SET_BLOCK_PROPERTY built-in).
Re: how can i populate record using LOV value [message #496731 is a reply to message #496719] Wed, 02 March 2011 02:52 Go to previous messageGo to next message
maddyd2k
Messages: 24
Registered: November 2010
Junior Member
Hi
i have created a database block---- EMP with empno,ename,sal columns
and i have taken a control item a text item given it as deptno and attched deptno_LOV to that deptno text item.

Now my problem is when i select a deptno from the lov it need to populate the records of thar deptno

help me

Thanks....
Re: how can i populate record using LOV value [message #496740 is a reply to message #496731] Wed, 02 March 2011 03:37 Go to previous message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I told you how to do that. Querying mechanism is always the same, but you can invoke it differently. For example, <KEY-NEXT-ITEM> on "control.deptno" item with
go_block('emp');
execute_query;
is one way.

Navigating to the "emp" block and pressing <Execute query> is another.

Pick any you like.
Previous Topic: Display Line number where exception raise
Next Topic: Master-Detail data displayed using LOV
Goto Forum:
  


Current Time: Mon Sep 16 13:06:52 CDT 2024