Populating Multirecord text fields from Tlists value's combinations
429603Feb 9 2005 — edited Feb 11 2005I have a UI wherein there are two T lists, one on the Left and other on the Right. The left one contains
From values and the Right one contains To values. There's one Button which when Pressed should populate
a Data Block which has multi record text fields just below the button with all the possible combinations of
the T lists elements. The Text fields have the values From, To, Time, Unit. When populated From and Two will
get the values from the combinations and the user will enter the values in other fields i.e. Time and Unit,
Then the user can save the Records.
e.g. If the Left T list contains Red, Blue and the Right T List contains Green, Black. Then on pressing
the button below the T lists, the text fields From and Two of a data block displayed in the same window
should get populated with all the possible combinations as:
From || To || Unit || Time
Red Green
Red Black
Blue Green
Blue Black
Now the user can enter the values for Unit as well as Time and when he does save the Records should be inserted
for the Data Blocks DML Source that's some table.
What I'm trying is:
On pressing the Button i'm writing code that will have Two PL/SQL Tables(Index by binary_integer). One will have
all the values of the left T List and the other with all the values of right T List.
I do it as in the WHEN BUTTON PRESSED as:
DECLARE
TYPE varchar_table IS TABLE OF VARCHAR2(30) INDEX BY BINARY_INTEGER;
from varchar_table;
to varchar_table;
v_count1 NUMBER;
v_count2 NUMBER;
v_count3 NUMBER;
v_count4 NUMBER;
BEGIN
v_count1 := Get_List_Element_Count('CONTROL.FROM_TYPE');
FOR i IN 1..v_count1 LOOP
from(i) := Get_List_Element_Value('CONTROL.FROM_TYPE', i);
END LOOP;
v_count2 := Get_List_Element_Count('CONTROL.TO_TYPE');
FOR i IN 1..v_count2 LOOP
to(i) := Get_List_Element_Value('CONTROL.TO_TYPE', i);
END LOOP;
END;
Now how will I populate the text fields with the values in the tables that i got with the piece of code above.
Any help would be appreciated. Any other method other than the one i'm trying is also welcome. Please note that
i'm not using any table to store the elements in the T Lists. The lists get values at runtime by
user's selection.
Thanks,
Abhishek.