Apex 3.2
I have a requirment to create a manual tabular form
One of the columns was to be a checkbox.
They are only allowed to tick one of the checkboxes in the form, so I decided to go with a radio group instead.
I have never used a radio group before, so my code maybe wrong
I also decided to base my form on a collection.
My create collection is working fine.
My tabular form sql is
select
APEX_ITEM.MD5_CHECKSUM(c001, c002, c003, c004, c005, c006, c007)||
apex_item.display_and_save(1, c001) ldeid,
apex_item.display_and_save(2, c002) start_date,
apex_item.display_and_save(3, c003) end_date,
apex_item.display_and_save(4, c004) conversion_factor,
apex_item.display_and_save(5, c005) target_bmi,
apex_item.text(6, c006) description,
apex_item.radiogroup(7,c007, 'Y,N') ssi,
apex_item.checkbox(12, seq_id) chkbx,
apex_item.hidden(13, seq_id) seq_id
from apex_collections
where collection_name = 'SMI_COL'
This displays the radio as required and a checkbox for deleting.
My update does not work, when I include the radio in the update.
If I do not include the radio, it works
Begin
FOR i IN 1..apex_application.g_f01.count
LOOP
apex_collection.update_member(
p_collection_name => 'SMI_COL'
, p_seq => apex_application.g_f13(i)
, p_c001 => apex_application.g_f01(i)
, p_c002 => apex_application.g_f02(i)
, p_c003 => apex_application.g_f03(i)
, p_c004 => apex_application.g_f04(i)
, p_c005 => apex_application.g_f05(i)
, p_c006 => apex_application.g_f06(i)
, p_c007 => apex_application.g_f07(i)
);
END LOOP;
END;
Also I can't seem to get my delete from collection to work
Begin
FOR i IN 1..apex_application.g_f13.count
LOOP
apex_collection.delete_member(
p_collection_name => 'SMI_COL'
, p_seq => apex_application.g_f13(i)
);
END LOOP;
END;
Any help much appreciated
Gus