Home » Developer & Programmer » Forms » How to Dynamically Populate a Poplist in the List item (windows XP, forms 6i)
How to Dynamically Populate a Poplist in the List item [message #627348] Tue, 11 November 2014 03:51 Go to next message
venugopalreddy2020
Messages: 3
Registered: November 2014
Location: Hyderabad
Junior Member
Hello Every body!

i have created the form which consists of 3 list items (house1,house2,house3):

for each one list item values are

Self Occupied => SO
Self Lease => SL
Let Out => LO

so the actual problem is that i want the list item to be displayed in such a way that

when i select an option from House1 as "Self Occupied" then remaining list items "house2,house3" they must exclude "Self Occupied" and show "Self Lease or Let Out" to select.

likewise when i select an option from House2 as "Self Occupied" then remaining list items "house1,house3" they must exclude "Self Occupied" and show "Self Lease or Let Out" to select.

likewise when i select an option from House3 as "Self Occupied" then remaining list items "house1,house1" they must exclude "Self Occupied" and show "Self Lease or Let Out" to select.

so to get the above mentioned logic to be implemented in the program how to write the program and where to write the program. if sample code is given then its well and good.

Kindly help me out and do the needful thing, as soon as possible!

Regards
Venugopal

Re: How to Dynamically Populate a Poplist in the List item [message #627356 is a reply to message #627348] Tue, 11 November 2014 04:41 Go to previous messageGo to next message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member
Chk this link


https://sites.google.com/site/craigsoraclestuff/oracle-forms---how-to-s/forms-howto-dynamically-populate-a-poplist

http://hamid-oracle.blogspot.com/2012/03/how-to-dynamically-populate-pop-list.html
Re: How to Dynamically Populate a Poplist in the List item [message #627712 is a reply to message #627356] Fri, 14 November 2014 23:20 Go to previous messageGo to next message
tara_260985
Messages: 46
Registered: November 2014
Member
I want to display a record in the drop down list when for example ,when user selects an item and click edit or view/delete ,it must display the company id for that item plus three other static values like 'compid 3,compid4,compid5) which are default values.so that user can change the value of the item from any of these company id. How can I populate list dynamically in run time plus it must have three other static valuefrom a drop down

[Updated on: Fri, 14 November 2014 23:28]

Report message to a moderator

Re: How to Dynamically Populate a Poplist in the List item [message #627731 is a reply to message #627712] Sat, 15 November 2014 08:26 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
The first "how to" is described in links posted above.

The second "how to" is
select whatever_you_want from some_table union all
select 'compid_3' from dual union all
select 'compid_4' from dual union all
select 'compid_5' from dual
Re: How to Dynamically Populate a Poplist in the List item [message #627752 is a reply to message #627731] Sat, 15 November 2014 11:56 Go to previous messageGo to next message
tara_260985
Messages: 46
Registered: November 2014
Member
Hey thank you for your valuable reply.
Just one query :
User 1st enters the item, in my drop down I want to display the company_name value as 'A' for that item, along with the three static values which will include A,B,C from another table ,so the logic is ..if the user wish to change the companyname,he can change from those three static values which are defined for the comapny value.so if the value for that company name is A,then user can change it to B or C
...so the drop down must have only 3 values...company values will be A,B,C.

can I use the query as given by you...will there be duplication of the company name in the drop down.
Re: How to Dynamically Populate a Poplist in the List item [message #627761 is a reply to message #627752] Sat, 15 November 2014 15:46 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
If you use UNION, there won't be duplicates. Or, use a subquery with DISTINCT. Besides, why don't you just try it?
Re: How to Dynamically Populate a Poplist in the List item [message #627790 is a reply to message #627761] Mon, 17 November 2014 00:32 Go to previous messageGo to next message
tara_260985
Messages: 46
Registered: November 2014
Member
I need to populate companyname for the warehouse number which I select;below is my query,still unable to fetch any records.

PROCEDURE P_COMP IS
RG_id RecordGroup;
RG_name varchar2(10) :='COMPANY_ID';
status NUMBER;
BEGIN
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,'select COMPANY_ID,TO_CHAR(WH) from wh_attributes');
/* Select statement must have two column*/
status := Populate_Group(RG_id);
Populate_List('B_WH_ATTRIBUTES.COMPANY_ID',RG_id);
END;
Re: How to Dynamically Populate a Poplist in the List item [message #627791 is a reply to message #627790] Mon, 17 November 2014 00:33 Go to previous message
tara_260985
Messages: 46
Registered: November 2014
Member
company_id column has company names like GPI,AI etc..
Previous Topic: Unable to delete a record from a block based on a View
Next Topic: Color property to a particular record
Goto Forum:
  


Current Time: Fri Apr 19 16:29:49 CDT 2024