Home » Developer & Programmer » Forms » Dynamic LOV creation (Forms Builder (9.0.4.2.0), Win XP)
Dynamic LOV creation [message #427832] Mon, 26 October 2009 01:57 Go to next message
shabar
Messages: 20
Registered: October 2009
Junior Member
Hi

I just add the following code to my WHEN-NEW-FORM-INSTANCE trigger
and added one list item in the property

DECLARE
	RG_NAME VARCHAR2(30) := 'RG_LIST';
	RG_ID RECORDGROUP;
	RET_CODE NUMBER(10);
	V_QUERY VARCHAR2(300);

BEGIN
	V_QUERY := 'SELECT to_char(AU_CODE) AU_CODE FROM FT_AUTHORS';
	RG_ID := FIND_GROUP(RG_NAME);

	IF NOT ID_NULL(RG_ID) THEN
		DELETE_GROUP(RG_ID);
	END IF;

	RG_ID := CREATE_GROUP_FROM_QUERY(RG_NAME,V_QUERY);
	RET_CODE := POPULATE_GROUP(RG_ID);
	POPULATE_LIST('CUSTOMER_ID_LIST_ITEM',RG_NAME);
	DELETE_GROUP(RG_ID);
END;



But at run time I couldn't see any items in the list except the item that I have added manually to the list.

If runs following query separately, results also there

SELECT to_char(AU_CODE) AU_CODE FROM FT_AUTHORS


What could be the reason..


rgds

shabar


Re: Dynamic LOV creation [message #427858 is a reply to message #427832] Mon, 26 October 2009 04:25 Go to previous messageGo to next message
rajesh4851
Messages: 89
Registered: January 2007
Member
try to add this in when-new-block-instance (the block which contains the list item )
Re: Dynamic LOV creation [message #427883 is a reply to message #427832] Mon, 26 October 2009 05:25 Go to previous messageGo to next message
rnemkul
Messages: 35
Registered: February 2006
Member
Try following syntax
'SELECT to_char(AU_CODE) AU_CODE,to_char(AU_CODE) AU_CODE, FROM FT_AUTHORS'

Raj
icon14.gif  Re: Dynamic LOV creation [message #427905 is a reply to message #427858] Mon, 26 October 2009 06:15 Go to previous message
shabar
Messages: 20
Registered: October 2009
Junior Member
Hi rnemkul

Thax a lot. It works fine with that

Thax 4 all


rgds


shabar
Previous Topic: Conectivity (merged 5)
Next Topic: Alert Message
Goto Forum:
  


Current Time: Sun Feb 09 13:37:42 CST 2025