poplute list [message #156282] |
Tue, 24 January 2006 06:38 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
awan
Messages: 9 Registered: September 2005 Location: Riyadh
|
Junior Member |
|
|
Hi,
I v populated list in country_list from the other table which v 2 columns conuntry_code number(10) and country_name varchar2(25)
the code is
DECLARE
RG_NAME VARCHAR2(40) :='COUNTRY_LIST';
GROUPID RECORDGROUP;
STATUS NUMBER;
BEGIN
GROUPID := CREATE_GROUP_FROM_QUERY(RG_NAME,'SELECT COUNTRY_NAME,COUNTRY_NAME FROM COUNTRY');
STATUS := POPULATE_GROUP(GROUPID);
POPULATE_LIST('COUNTRY_LIST',GROUPID);
END;
I need the solution to save country_code in datebase instead of conuntry_name...... and country_name should display in list ....if I modify query like SELECT COUNTRY_NAME,COUNTRY_ID FROM COUNTRY....it dosnot works
plz help me abt it.....
I will be very thankfull to u
|
|
|
|
Re: poplute list [message #156870 is a reply to message #156341] |
Sun, 29 January 2006 01:03 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
awan
Messages: 9 Registered: September 2005 Location: Riyadh
|
Junior Member |
|
|
Hi Mr.David,
I think I couldnot explain well....let me explain it again.....I made a List Item (Combo box)named 'CPI_ISSUE_COUNTRY' at my form ...I want to populate list from other table "country"(which v 2 colums (1)country_id (2)country_name) in this combo box ..I v populated the list in combo box by creating record group with the help of this code:
Trigger : WHEN-NEW-FORM-INSTANCE (Form Level)
DECLARE
RG_NAME VARCHAR2(40) :='CPI_ISSUE_COUNTRY';
GROUPID RECORDGROUP;
STATUS NUMBER;
BEGIN
GROUPID := CREATE_GROUP_FROM_QUERY(RG_NAME,'SELECT COUNTRY_NAME,COUNTRY_NAME FROM COUNTRY');
STATUS := POPULATE_GROUP(GROUPID);
POPULATE_LIST('CPI_ISSUE_COUNTRY',GROUPID);
END;
The scenario is that I want to save country_id in database instead of country_name ...but country name should display in the combo box
the second Scenario is:
on the same form I v made one other combo box named 'CPI_CITY_NAME' in which cities r populating in the same way as coutries are populating in the 'CPI_ISSUE_COUNTRY'.....Wat the end user required ....when he select USA from the first combo box 'CPI_ISSUE_COUNTRY' only the USA cities should display in the cities combo box 'CPI_CITY_NAME' and if he select other country ,then the cities of that country should display....
I really appritiate u ...that u experts r solving the problems of peoples....
Thanks
|
|
|
Re: poplute list [message #156903 is a reply to message #156870] |
Sun, 29 January 2006 19:28 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Then add the Country Field to the 'select' statement used in the second (city) field. As I said, search this forum for 'record group' and try 'record group country'. This question has been answered previously.
David
|
|
|