How to add list items in run time [message #173822] |
Wed, 24 May 2006 11:42 |
vikasg2006
Messages: 80 Registered: March 2006 Location: Dubai
|
Member |
|
|
hy
can any body tell me how can we add list items in run time D2K
(5.0) . Means we cannot assign LIST ITEMS values using property
but can fetch from database and assign runtime? my code is attach below but it doesn't work
DECLARE
rg_id RecordGroup;
list_id Item;
v_query VARCHAR2(1000);
error NUMBER;
BEGIN
v_query := 'SELECT DEPTNO FROM DEPT';
rg_id := find_group ('TEST');
if ID_Null (rg_id) then
rg_id := create_group_from_query('TEST', v_query);
end if;
error := populate_group(rg_id);
list_id := Find_Item ('v_item');
clear_list (list_id);
populate_list (list_id, rg_id);
END;
vikas
|
|
|
Re: How to add list items in run time [message #174446 is a reply to message #173822] |
Mon, 29 May 2006 04:35 |
gacki
Messages: 33 Registered: May 2006 Location: Dueren, NRW, Germany
|
Member |
|
|
If you have a record group named "TEST" defined in your form then
always returns false, and your record group will be populated with the properties set at designtime, not at runtime.
Gerald
|
|
|
|
Re: How to add list items in run time [message #174531 is a reply to message #173822] |
Mon, 29 May 2006 08:09 |
vikasg2006
Messages: 80 Registered: March 2006 Location: Dubai
|
Member |
|
|
hy Gerald
this is the problem which i face .when i run my form list item doesn't show values which i want to fetch from database(initial value display). now i want solution. is there any other way in d2k to fetch list items value in run time. any other way?
hy david
as u ask me why i am not using non-dynamic Record group.... the reason is we are working in huge data. for example if one static record group display this cities of india ...OK. it means it contains 100's of entries in which we have to select..OK now in case of dynamic RG i want to display only those cities having in rajasthan..OK got my point, it can faster the query when working on huge amount of data and remove un-necesssary values
thanks for reply
vikas
[Updated on: Mon, 29 May 2006 08:14] Report message to a moderator
|
|
|
|
Re: How to add list items in run time [message #174613 is a reply to message #174446] |
Tue, 30 May 2006 01:40 |
vikasg2006
Messages: 80 Registered: March 2006 Location: Dubai
|
Member |
|
|
gacki wrote on Mon, 29 May 2006 04:35 | If you have a record group named "TEST" defined in your form then
always returns false, and your record group will be populated with the properties set at designtime, not at runtime.
Gerald
|
To : Mr Gerald,
No, i have not create any recored group named 'TEST'.
but same this process are working on form 9i, so will u please tell me,is this codes workes on form 4.5?
Regards
Vikash
|
|
|
Re: How to add list items in run time [message #174700 is a reply to message #174613] |
Tue, 30 May 2006 06:26 |
gacki
Messages: 33 Registered: May 2006 Location: Dueren, NRW, Germany
|
Member |
|
|
I'm totally confused: you talk about D2K (5.0), then you say it works in 9i and now you ask if it works in 4.5.........
I have no experience with 4.5, only 6i web, 9i and 10g.
Where have you placed your code (trigger?), and why do you think it doesn't work?
Gerald
|
|
|
Re: How to add list items in run time [message #174971 is a reply to message #173822] |
Wed, 31 May 2006 04:58 |
vikasg2006
Messages: 80 Registered: March 2006 Location: Dubai
|
Member |
|
|
hy
i am using forms 4.5(or 5 its same). i m put my code in one button and there is one list item name v_item ok. when i click on button the list item does not populate as per the query which i write inside button. there is no record group. we have to create at run time
vikas
|
|
|
|
|
|