krisztina1981
asked on
Populate a list item with data stored in a table
Hi,
I have a form (created using the "book" table) which has a list item(poplist) called "year_book".
I have created a table "year_list" with only one column "year_book". In this "year_list" i have inserted years from 1900-2000.
At this point i want to populate the "year_book" list item(poplist) from the "book" form, using the table "year_list".
Can anyone help me??
Thank you in advance,
krisz
I have a form (created using the "book" table) which has a list item(poplist) called "year_book".
I have created a table "year_list" with only one column "year_book". In this "year_list" i have inserted years from 1900-2000.
At this point i want to populate the "year_book" list item(poplist) from the "book" form, using the table "year_list".
Can anyone help me??
Thank you in advance,
krisz
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Dj,
Sorry for my late response but i couldn't answer earlier. Thanks for your detailed answer, but I have a problem with a line of the sample code: RG_RETURN_CODE := Populate_Group('rg_years'' ); it tells me that i have to declare the identifier RG_RETURN_CODE. I don't know what to do. :(
Can you help me one more time? :)
I'm using oracle forms 6i, in client-server.
Thanks,
Krisz
Sorry for my late response but i couldn't answer earlier. Thanks for your detailed answer, but I have a problem with a line of the sample code: RG_RETURN_CODE := Populate_Group('rg_years''
Can you help me one more time? :)
I'm using oracle forms 6i, in client-server.
Thanks,
Krisz
Krisz,
You just have to declare it like this at the top of the trigger:
DECLARE
RG_RETURN_CODE Number;
You can use it after the function call to check how successful the Populate_group was - the Populate_Group help screen in Forms says that 0 is good and other values are actual Oracle Error values. Since we have a generic On Error trigger to trap all errors and log them to a table, I don't bother doing the error handling here but you may want to for your application.
Hope this does it for you.
DJ
You just have to declare it like this at the top of the trigger:
DECLARE
RG_RETURN_CODE Number;
You can use it after the function call to check how successful the Populate_group was - the Populate_Group help screen in Forms says that 0 is good and other values are actual Oracle Error values. Since we have a generic On Error trigger to trap all errors and log them to a table, I don't bother doing the error handling here but you may want to for your application.
Hope this does it for you.
DJ
ASKER
Hi DJ
It's working now :).
Thanks again for your answer, it really helped me.
Thanks,
krisz
It's working now :).
Thanks again for your answer, it really helped me.
Thanks,
krisz
u cannot populate year details from a detail, when u have a list item.
for ur condition, u should go a List Of Values only.
regards
annamalai