Dynamic List Box [message #134786] |
Sat, 27 August 2005 00:31 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
samit_gandhi
Messages: 226 Registered: July 2005 Location: Hong Kong
|
Senior Member |
![samit_gandhi](/forum/theme/orafaq/images/yahoo.png)
|
|
I want the list item to be selected on the basis of query at runtime. I have written like this :
declare
rg recordgroup;
status number;
begin
RG := CREATE_GROUP_FROM_QUERY('LIST_RG',
'SELECT COUNTRY, COUNTRY FROM COUNTRY_MASTER');
STATUS := POPULATE_GROUP('LIST_RG');
POPULATE_LIST('DESIGN_PROCESS.COUNTRY_NAME','LIST_RG');
end;
But here i can not give the condition. I want the query to be condition. What i have to do pls advise.
Samit Gandhi
|
|
|
Re: Dynamic List Box [message #134826 is a reply to message #134786] |
Sat, 27 August 2005 11:57 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
ramisy2k
Messages: 150 Registered: April 2005
|
Senior Member |
|
|
Hi samit,
i purpose u the following..
make a non-db display (VARCAHR2) item on the form...for example..'Item_1"
now in the record group code which u mentioned in ur original message insert some value in the ':ITEM_1' i.e either numeric or in varchar.. on run time when ur list item will be populated the item_1 will also be filled with some temporaray value and then on the basis of this value make ur futher logic or conditions
see the adjusted code below...
declare
rg recordgroup;
status number;
begin
RG := CREATE_GROUP_FROM_QUERY('LIST_RG',
'SELECT COUNTRY, COUNTRY FROM COUNTRY_MASTER');
STATUS := POPULATE_GROUP('LIST_RG');
POPULATE_LIST('DESIGN_PROCESS.COUNTRY_NAME','LIST_RG');
:ITEM_1 := '1'; ---- YOU MAY ALSO INSERT 'QUERY_1'
end;
now since then value in item_1 will remaIn '1' throughout you may make your further logic through it....the value in ITEM_1 WILL THUS SHOW THE 'QUERY' IS UR CONDITION
If :ITEM_1 = '1'
THEN...
......;
END IF;
[Updated on: Sat, 27 August 2005 12:03] Report message to a moderator
|
|
|