Home » Developer & Programmer » Forms » Dynaically populate second list based on first (Oracle Forms 6i)
Dynaically populate second list based on first [message #401190] Sat, 02 May 2009 02:46 Go to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

I have created one form which 2 list box based on 2 columns of asset table asset_category_code and asset_sub_category_code.Somehow i tried to populate the first list by added triiger in new form instance and i have written trigger when changed list as follows to dynamically based on value i chose on first...... but nothing is commin in second list.i am attaching the form also please help

declare
rg_id recordgroup := find_group('SUB_CATG_RG') ;
ln_error number ;
begin
if not id_null(rg_id) then
ln_error := populate_group(rg_id) ;
if ln_error = 0 then
populate_list('FIX_ASSET_KEY.AT_SUB_CATG_CODE' , rg_id) ;
else
message('Error in Populating Group') ;
end if ;
end if ;

end ;
  • Attachment: ASSET.fmb
    (Size: 88.00KB, Downloaded 156 times)
Re: Dynaically populate second list based on first [message #401198 is a reply to message #401190] Sat, 02 May 2009 06:39 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

nobody is there to helppppp
Re: Dynaically populate second list based on first [message #401205 is a reply to message #401190] Sat, 02 May 2009 10:17 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
1) You violate Posting Guidelines by cross/multi-posting
http://www.orafaq.com/forum/m/401191/136107/#msg_401191
2) You post in wrong forum; This 1 not Forms
3) You do not use <code tags>

DECLARE
  rg_id     RECORDGROUP := Find_group('SUB_CATG_RG');
   ln_error  NUMBER;
BEGIN
  IF NOT Id_null(rg_id) THEN
    ln_error := Populate_group(rg_id);
    
    IF ln_error = 0 THEN
      Populate_list('FIX_ASSET_KEY.AT_SUB_CATG_CODE',rg_id);
    ELSE
      Message('Error in Populating Group');
    END IF;
  END IF;
END; 


You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/

The Forms experts are away & enjoying their weekend.
Perhaps you should too.


Re: Dynaically populate second list based on first [message #401210 is a reply to message #401205] Sat, 02 May 2009 11:33 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

Hi,

chech the record group query.

change the query like this . It wil work .

CATEGORY
select CATG_NAME,CATG_CODE from fix_category

SUB_CATG
SELECT S_SUB_CATG_NAME,S_SUB_CATG_CODE FROM FIX_SUB_CATEGORY
WHERE S_CATG_CODE=:FIX_ASSET_KEY.AT_CATG_CODE
  • Attachment: ASSET.fmb
    (Size: 88.00KB, Downloaded 125 times)
icon14.gif  Re: Dynaically populate second list based on first [message #401233 is a reply to message #401210] Sun, 03 May 2009 01:27 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Hi Klat ,

Thanks , its really working but i should get the code how can i do that....now user is gettting only the name..

Regards

Arif
Re: Dynaically populate second list based on first [message #401234 is a reply to message #401233] Sun, 03 May 2009 01:54 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

your record group query

CATEGORY
select CATG_NAME,CATG_CODE from fix_category

if you use this record group for populate_list , list item will display catg_name and its value will be catg_code.

if you want to display value itself you can do like this

select CATG_CODE,CATG_CODE from fix_category
Re: Dynaically populate second list based on first [message #401238 is a reply to message #401234] Sun, 03 May 2009 02:16 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

thanks klat ,

Again one more doubt if i want both code and name then what should i do......Can we have more columns in pop lists
Re: Dynaically populate second list based on first [message #401243 is a reply to message #401238] Sun, 03 May 2009 03:25 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member

Hi,

you can use like this .
select CATG_CODE||' '||CATG_NAME name,CATG_CODE from fix_category
icon14.gif  Re: Dynaically populate second list based on first [message #401251 is a reply to message #401243] Sun, 03 May 2009 05:21 Go to previous messageGo to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Thanks klat , i dont know your name , but your help i appreciate.Can you please help me learning oracle forms as i am new to developer 2000 and i will appreciate if you can send me documents on forms
Re: Dynaically populate second list based on first [message #401896 is a reply to message #401251] Wed, 06 May 2009 20:28 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Help yourself! Search this forum for 'tutorial'.

David
Previous Topic: Problem in OLE2 with vietnames language
Next Topic: how to open VNC APPLICATION from the same form
Goto Forum:
  


Current Time: Fri Dec 09 23:05:44 CST 2016

Total time taken to generate the page: 0.27272 seconds