Re: combo box lists help needed
Date: Mon, 11 Jan 1999 16:30:28 -0000
Message-ID: <77d8v7$5aj$1_at_pthp35.telecom.pt>
This should help you even more ...
-
[Quoted]
- Create a program unit:
PR_FILL_LIST is
CURSOR c1 IS
SELECT id_field, descr_field, FROM table;
i number;
BEGIN
i1 := 2; FOR rec IN c1 LOOP Add_List_Element('BLOCK.COMBO_ITEM', i, rec.descr_field, rec.id_field); i := i + 1; END LOOP; Delete_List_Element('BLOCK.COMBO_ITEM', 1); EXCEPTION WHEN NO_DATA_FOUND THEN null; WHEN OTHERS THEN Message('pr_fill_list: Error: '||sqlerrm); Raise Form_Trigger_Failure;END; 2) On the item COMBO_ITEM properties remember to put the property <Required> to False.
3) Invoke the procedure pr_fill_list on the When-New-Form-Instance Trigger
4) After, add this line of code to your trigger:
:BLOCK.COMBO_ITEM := Get_List_Element_Value('BLOCK.COMBO_ITEM', 1);
Note: You can do steps 3) and 4) whenever you want, therefore updating your combo box on runtime.
Best Regards,
Bruno Fernandes (Email: bruno-s-fernandes_at_telecom.pt)
mdesouza_at_YAHOO.COM wrote in message <76vavd$222$1_at_nnrp1.dejanews.com>...
>Got a slight problem
>
>one of my fields is a combo box list, which has to be populated with values
>from a table.
>
>how do i do this , I can do this easily with a lov and record groups but is
>there a way that I can populate a list with values from another table and
does
>change but not that frequently
>
>when the user select the list he should have values which exist in the
codes
>table which does change
>
>regards
>
>michael Dsouza
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Mon Jan 11 1999 - 17:30:28 CET