urgent: can someone help me with dynamic drop-down? [message #83510] |
Mon, 20 October 2003 09:56 |
SA
Messages: 37 Registered: March 2002
|
Member |
|
|
Hi, I have a drop down which come from a database table (for example select event_type from event_type_table) and this drop down is in a data block (say the query associate with this datablock is "select event_date, event_type, event_place from event_table where user = 'somebody'). So when the form load it, in event block, it should show some info from database table event_table. And event_type is a drop down and it should show the value from the above query. I'm new to this, so I don't know what is the good way to implement this. Can someone help me with this? This is urgent. I need to have this done asap. Thank you in advance.
Sa
|
|
|
Re: urgent: can someone help me with dynamic drop-down? [message #83511 is a reply to message #83510] |
Mon, 20 October 2003 14:17 |
Rick Foerst
Messages: 2 Registered: October 2003
|
Junior Member |
|
|
I do this by populating the item_list parameter by a program unit which is executed in the when_new_form_instance trigger.
cursor c_csg_problem_all is
select des
from ops$cei.cei_prob_code
order by problem_code
;
cr_csg_problem_all_all c_csg_problem_all%rowtype ;
/* Working variables */
t_list_id ITEM;
t_list_count NUMBER ;
t_loop_count NUMBER ;
begin
Getting in.', 'W', FALSE) ;
/* find item list */
<< find_list >>
t_list_id := find_item('CSLGL_PROBLEM') ;
/* build item list */
<< build_list >>
t_loop_count := 1 ;
t_list_count := Get_List_Element_Count(t_list_id) ;
for cr_csg_problem_all in c_csg_problem_all loop
add_list_element(t_list_id, t_list_count + t_loop_count,
cr_csg_problem_all.des,cr_csg_problem_all.des );
t_loop_count := t_loop_count + 1 ;
end loop build_list ;
end CEI_CSG_PROBLEM_LIST ;
|
|
|
|