Re: Needing to know how to use LOV's in Oracle Forms 6.1

From: Jim <jimnmitsy_at_cableone.net>
Date: Thu, 26 Jul 2001 07:49:28 -0500
Message-ID: <tm04g0ivhcm939_at_corp.supernews.com>


WHEN-NEW-FORM-INSTANCE - trigger

DECLARE
 GROUP_ID RECORDGROUP;
 OUTCOME NUMBER;
BEGIN
   group_id:=create_group_from_query('LIST_ELEMENTS','SELECT DISTINCT FUND_RATE,FUND_RATE
      FROM FUND WHERE AUTOPRINT<>''N'' ORDER BY 1');    outcome:=populate_group(group_id);
   populate_list('PRGM',group_id);
   add_list_element('PRGM',1,'ALL','ALL');    :prgm:='ALL';
   SET_ITEM_PROPERTY('prgm',REQUIRED,PROPERTY_TRUE);    delete_group(group_id);
END; this will create your LOV with the data in the table, this will create it when you enter the form. If your data changed you would need to rerun this

PRGM is my list item
if required property is true then you won't get the blank entry at the end

metalink has some examples with error trapping, but if the query is right I never have any problems

Good Luck

JM

"Parish" <pkpollard_at_hotmail.com> wrote in message news:a22b630.0107240728.406174cc_at_posting.google.com...
> I am trying to make a list of values (or something similar if you know
> of a way) that will allow a list of values to be automatically
> populated by data that is already in the database. For example: if I
> am tracking a particular company and several of the contacts that work
> for that company, how do I select the one contact that I want (so that
> his/her information is displayed) so that the fields (like phone,
> email address, fax number, and whatever else that is personal to that
> contact) are populated? I am also wanting this to be automatically
> updated when new contacts are added. If you can even help with a
> little bit of my question, please do!
Received on Thu Jul 26 2001 - 14:49:28 CEST

Original text of this message