I need to insert into DB a value, witch end user enter into combobox.
Posted on 2004-03-24
In my forms block T_DAL I have a ListItem 'CMB_AERO' witch is a data base field (AERO_ID) and here I Populate data from other table T_AERO. I populate this list on when-new-form-instance trigger and populate it from record group
Record Group selekt = 'Select AERO_PAV, to_char(AERO_ID) from T_AERO';
When I inserting a new value into T_DAL, I also assign a value to CMB_AERO (select it from combobox)
But if user enter into this combobox a new data, I want to insert this to my T_AERO table, or open a new form (for enter data for new Aero).
In when-validate-item trigger I put such code
listAero ITEM := find_item('CMB_AERO');
Llab := :T_DAL.cmb_aero;
select S_AERO.nextval into LVal from dual;
insert into Aviacija.T_AERO(aero_id, aero_pav) values (lval, llab);
add_list_element(listAero, 1, llab, LVal);
I see a new value in a list, but not in DB.
How to insert these new values list, DB and that value user could assign at once to CMB_AERO?
Could you give some advices, comentars?
I would be very pleased