To poulate a text item from LOV [message #309156] |
Wed, 26 March 2008 12:02  |
sqlstar_student
Messages: 42 Registered: November 2007
|
Member |
|
|
I created a form it contains 2 text items exam_code,Course_name
There is a table Question_paper holding some colums
Sno Questions Exam_code and Course_name
1 .... 7 sql
2 .... 1 pl/sql
3 .... 7 sql
4 .... 1 pl/sql
1st text item Exam_code is being populated by a LOV which is being populated by using a code
select exam_code from question_paper
the LOV now displays 2 values 7 and 1
When i select the 7 at runtime i want it to display the respective course name
So in the 2nd text item i put a when_validate_item trigger and wrote
select Course_name
into :block_name.Item_name(:block1.Course_name)
from table(Question_paper)
where exam_code = :Block1.Exam_code
But its not working
|
|
|
Re: To poulate a text item from LOV [message #309170 is a reply to message #309156] |
Wed, 26 March 2008 13:13   |
Kaeluan
Messages: 179 Registered: May 2005 Location: Montreal, Quebec
|
Senior Member |
|
|
You don`t have to create a when-validate_item trigger to do that.
You LOV should also select the course_name in the LOV
select exam_code,course_name from question_paper;
If you don`t want to display the course name in the lov, go in the "column mapping properties" of the lov and set the width of the course name to 0 and set the return item value to :block1.Course_name instead. This way when you select the Exam code in your LOV it will fill the course name automatically.
Hope i understand your question correctly and hope it help.
|
|
|
|