Home » Developer & Programmer » Forms » populate list (oracle forms)
populate list [message #326564] Thu, 12 June 2008 00:13 Go to next message
anirbang11
Messages: 3
Registered: June 2008
Location: India
Junior Member
dear All,
i have a problem....
i've two popup list.and i've to generate 2nd list dynamically on the basis of valu of first list.
for exemple.....
list 1 list2 record group
------- -------- -------------
1--------->generate list on the basis of--->RG1
2--------->generate list on the basis of--->RG2
3--------->generate list on the basis of--->RG3

please give me a suggation....
thank you
Re: populate list [message #326569 is a reply to message #326564] Thu, 12 June 2008 00:40 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Dear friend what kind of suggestion you need. The stpes seems to me very simple. Put WHEN-LIST-CHANGED trigger on 1st and 2nd LIST item.

The 1st list item will generate the values for 2nd list item and when WHEN-LIST-CHANGED trigger of 2nd list item fire it will generate the list values for 3rd list item.
Re: populate list [message #326575 is a reply to message #326569] Thu, 12 June 2008 00:54 Go to previous messageGo to next message
anirbang11
Messages: 3
Registered: June 2008
Location: India
Junior Member
Hi,
actully can not generate 2nd list.
the first list is static.
the first list contains (for exemple) employee attributes such as category,location.etc.
now if i select category from first list then the 2nd list shows the records from category master table....if i select location from 1st list then the 2nd list shows the values from location master table...
and i could not handle the problem....
Re: populate list [message #326579 is a reply to message #326575] Thu, 12 June 2008 00:59 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
The solution to your problem is the event WHEN-LIST-CHANGED which told you before.

Ok your first list is static if you have selected a default value then you have to generate the 2nd list values on event when this block is available to user that can be WHEN-NEW-FORM-INSTANCE or WHEN-NEW-BLOCK-INSTENCE etc.

If you haven't assign a default value to the 1st list item then when the 1st list item is changed the event WHEN-LIST-CHANGED is fired and on this event you populate the 2nd list item if the value of 1st list item is not null.
Re: populate list [message #326586 is a reply to message #326579] Thu, 12 June 2008 01:17 Go to previous messageGo to next message
anirbang11
Messages: 3
Registered: June 2008
Location: India
Junior Member
it gives two error at run time
FRM-41331:Could not delete element from..
FRM-41337:Cannot populate the list from record group
Re: populate list [message #326598 is a reply to message #326586] Thu, 12 June 2008 01:51 Go to previous message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
dont delete element use clear_list ('list_name') to clear all the elemetns of a list item
Previous Topic: Procedure Block
Next Topic: Function Keys in Forms 10G
Goto Forum:
  


Current Time: Fri Sep 27 12:18:29 CDT 2024