Re: List Item (Developer)

From: Sorokin Anton (Moscow) <"Sorokin>
Date: 2000/02/16
Message-ID: <88dpou$rci$1_at_pechkin.menatep.spb.ru>#1/1


 Hi !

  1. Make the Text Item on the Block. Properties /Item Type = List Item

/List Stile = Poplist or Combo Box.

2) Uour need to fill data.

     Triggers / WHEN_NEW_FORM_INSTANCE

  1. Example:

clear_list('TEXT_ITEM1');

ADD_LIST_ELEMENT('TEXT_ITEM1',1,'word1','word1');
ADD_LIST_ELEMENT('TEXT_ITEM1',1,'word2','word2');
ADD_LIST_ELEMENT('TEXT_ITEM1',1,'word3','word3');
:BLOCK1.TEXT_ITEM1 := 'word2';

If uour want to dsiplay values fetched by a query:

b) Uour kan to include the procedure ADD_LIST_ELEMENT into the cycle or cursor.

 Example:

declare

cursor curCUR is
  select ID from MT where substr(ID,1,3) in ('303','304') order by ID desc;

cCUR varchar2(20);

begin

open curCUR;

   clear_list('TEXT_ITEM1');

     loop
       fetch curCUR into cCUR;
       exit when curCUR%NOTFOUND ;
       ADD_LIST_ELEMENT('TEXT_ITEM1',1,cCUR,cCUR);
    End loop;
Close curCUR;

ADD_LIST_ELEMENT('TEXT_ITEM1',1,'3030108','3030108'); End;

c) Uour can to use function "Populate_List"

  Example:

declare

 w1                  number;
 cSQLQuery  varchar2(2000);
 name1           varchar2(40) := 'Word1';
 rg1                 RecordGroup;
 It1                   item := Find_Item('LIST_BOX1');

Begin

cSQLQuery := 'select ID, Name, Amount from MT order by ID'; rg1 := CREATE_GROUP_FROM_QUERY(name1, cSQLQuery);

if Id_Null(rg1) then
  w1 := Show_Alert('Alert7');
 end if;

if Populate_Group(rg1) !=0 then
  w1 := Show_Alert('Alert7');
end if;

Populate_List(It1, rg1);

 go_block ('BLOCK_MT');
 execute_query;

end;



With best regards
Sorokin Anton

moby <moby_at_emirates.net.ae> ÓÏÏÂÝÉÌ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:8833m4$3vi1_at_news.emirates.net.ae...
> Hi everybody!
>
> I am sort of new in Developer 2000(R2). I want to know if there is
 anything
> like a VB list item where you can have multiple columns. Actually I want
 to
> dsiplay values fetched by a query in a list/table manner from where the
 user
> will be able to choose a certain record.
>
> ??????
>
> Moby.
>
>
Received on Wed Feb 16 2000 - 00:00:00 CET

Original text of this message