Calling a field from list items...Please help me!! [message #167981] |
Tue, 18 April 2006 04:19 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Rose_250
Messages: 17 Registered: April 2006
|
Junior Member |
|
|
hi every body,
I face a problem in calling a field from list items...
what shall I do?
I have faculty table which contains facultycode and facultyname,
I made the facultycode as list Item, and facultyname as text item, but the problem is that when I select the facultycode, the facultyname doen't appear automatically..
I used LOV in order to range facultycode in a list:
First I create a faculty list in DB which only contains facultycode :
SQL> create table faculty_list
2 ( facultycode varchar2(2));
Table created.
SQL> insert into faculty_list values(1);
SQL> insert into faculty_list values(2);
SQL> insert into faculty_list values(3);
SQL> insert into faculty_list values(4);
Then I create LOV by using this Query:
select facultycode into :faculty.facultycode from faculty order by facultycode;
Then I create a Button and i wrote this code:
declare
return_lov boolean;
begin
return_lov :=show_lov('faculty_lov');
end;
Note: you can see the attached picture
I i used a trigger KEY-NEXT-ITEM for facultycode with the following code:
if :system.mode = 'Enter-Query' then
execute_query;
end if;
on the other hands, i used a trigger WHEN-VALIDATE-ITEM for facultyname with the following code:
BEGIN
select facultyname
into :faculty.facultyname
from faculty
where facultycode=:faculty.facultycode;
END;
Can any body help me to solve this problem? Urgent Please
-
Attachment: LOVcode.bmp
(Size: 1.37MB, Downloaded 958 times)
|
|
|
|
|
Re: Calling a field from list items...Please help me!! [message #168446 is a reply to message #168110] |
Thu, 20 April 2006 08:17 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Rose_250
Messages: 17 Registered: April 2006
|
Junior Member |
|
|
Hi Mr. David
Thank you very much for your guidance..
I'll try to do this on Saturday because I haven't a university today and tomorrow..
Actually, I agree with you that the user should select the facultyname which should be assigned to facultycode/facultyID.
Thats what I intend to make in the form that I will use it to generate a report for me..
But I am using another form just for inserting, deleting, updating, & searching of any faculty code and its name. What did you think Sir?
I'll try to make two cloumns in LOV using go_item trigger, and I'll tell you what will happen if you don't mind.
Thanks a gain
Regards
Rose
|
|
|
|
Re: Calling a field from list items...Please help me!! [message #168929 is a reply to message #168531] |
Mon, 24 April 2006 04:18 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ksmbabu
Messages: 9 Registered: April 2006 Location: MALAYSIA
|
Junior Member |
|
|
yes you can use create_group_from_query function to populate the record group progrmmatically. put the code in when-new-form-instance trigger. under the textfiled of LOV u create a trigger
key-listval
begin
list_values;
end;
where r u from. can we be friends
|
|
|
|
|