Page 1 of 1

Dynamicaly population of list

Posted: Thu Apr 12, 2007 6:08 am
by shekhar_lonkar
Dear alll...

I have written following code for population of client no dynamicaly.

but whn i run the form and clicks on the list item it gives error like...

CLIENT_NO is not list item...but i have already set the propery of CLIENT_NO as list_item and list_style as comb Box.

My recoed gruop populates succussfully.

Awaiting for reply...
--------------------------------------------------------------------------------


PROCEDURE POPULATE_CLIENT_NO(EVENT VARCHAR2)IS

CLIENT_REC_GRP RECORDGROUP;
STATUS NUMBER;
BEGIN
-- GO_BLOCK('SALES_ORDER_MASTER');
IF EVENT='WHEN-NEW-FORM-INSTANCE' THEN
CLIENT_REC_GRP:=CREATE_GROUP_FROM_QUERY('CLIENT_REC_GRP','SELECT A.CLIENT_NO,A.CLIENT_NO FROM SALES_CLIENT_MASTER A');
IF NOT ID_NULL(CLIENT_REC_GRP) THEN
STATUS:=POPULATE_GROUP(CLIENT_REC_GRP);
MESSAGE(STATUS);
--MESSAGE(CLIENT_REC_GRP);
GO_BLOCK('SALES_ORDER_MASTER');
POPULATE_LIST('SALES_CLIENT_MASTER.CLIENT_NO',CLIENT_REC_GRP);
END IF;
END IF;

Posted: Sun Apr 15, 2007 10:28 pm
by amirtai
Hi

How come you are selecting A.CLIENT_NO twice! in your query?


"SELECT A.CLIENT_NO,A.CLIENT_NO FROM SALES_CLIENT_MASTER A');

Posted: Wed Apr 18, 2007 5:21 am
by mirza_rehan
Change Item Type property to List Item of 'SALES_CLIENT_MASTER.CLIENT_NO'

hope it will solve yours problem