how show deptname in controlblock textbox at navegation time [message #169156] |
Tue, 25 April 2006 06:47 |
mfa786
Messages: 210 Registered: February 2006 Location: karachi
|
Senior Member |
|
|
hi master
sir
i have one employ block and one control block in employ block i have many textbox and three lov and in control block i have three textbox when i call lov then pass code in employ textbox and title in controlblock textbox and save but when i navigate record then my system not show title in controlblock textbox only show code in employ text box
i past this code in post-change event
select title into :deptname from dept where deptno= :emp.deptno;
but this code not show deptname in control block textbox
please give me idea how i show deptname in control block textbox
and which event i use
thanking you
aamir
|
|
|
Re: how show deptname in controlblock textbox at navegation time [message #169288 is a reply to message #169156] |
Wed, 26 April 2006 02:34 |
|
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
aamir,
Please, please use FULL punctuation with full-stops and capitals for the first word of each sentence. Your posts are very hard to read.
Do not use the Post-Change trigger, it is an old one and will be discontinued, use the When-Validate-Item and When-Validate-Record triggers.
Concerning LOVs, in your control block, use them to populate more than one field at a time, that is, if you use the LOV on 'deptno' get the LOV to populate 'deptno' and 'deptname', and on 'deptname' get the LOV to populate 'deptno' as well as 'deptname'.
In you data block, use Post-Query to populate 'deptname' from 'deptno' during retrieval, and use a When-Validate-Item trigger on 'deptno' to populate 'deptname', and on 'deptname' (which I am assuming is not stored in the database) you have a Key-Listval trigger which does a "go_item(:blk.deptno); list_values; go_item(:blk.deptname);" To the user it looks as though they never left the 'name' field.
David
|
|
|