How to make Dynamic List Item in Oracle Forms Builder?

AttachmentSize
Image icon untitled.JPG6.77 KB
articles: 

In this article I will tell you how you can make a dynamic List of values in oracle forms builder, most developer use many techniques to make List of values. I will tell you a simple and very suitable method for making List item dynamically.
You can use this code in NEW-FORM-INSTANCE

DECLARE
GROUP_ID   RECORDGROUP;
LIST_ID	   ITEM := FIND_ITEM('DOC_TYPE');
STATUS NUMBER;
BEGIN
GROUP_ID := FIND_GROUP('TYP');
IF NOT ID_NULL(GROUP_ID) THEN
DELETE_GROUP(GROUP_ID);
ELSE
GROUP_ID := CREATE_GROUP_FROM_QUERY
('TYP','SELECT CAT_DESC,CAT_ID FROM MAIN_CATEGORY');
END IF;
STATUS := POPULATE_GROUP('TYP');
POPULATE_LIST(LIST_ID,GROUP_ID);
END;

I hope this article will helpful for any new one. Thanks

Oracle A To Z

Comments

Hi, I am a novice in oracle forms.

I've tried to make a list of values using this code in new-form-instance trigger, but couldn't do it.
Kindly explain if the item 'doc_type' is a text item or a poplist.
Please explain a little bit more about the procedure.

Dear Rahul,

It is very easy dear,
1st take one item field set property of this item filed to "List Item" then use this code same in "new-form-instance" I hope it will work, if you fell any problem then tell me I will explain you in detail, also send you a sample form. Thanks.

I have tried the method you just specified, but I got an error related to element in list item saying that:

'No elements defined for the list item'

Kindly help me.

Hi zahid9999,

Is it possible to select multiple values in a list item?