Apex collection column 2,3,4 etc and above value not getting properly

Apex collection column 2,3,4 etc and above value not getting properly in the classic report, we follow the below method to solve the issue.

1. Write the sql query for below

apex_item.checkbox2( p_idx =>1, p_value => '~'||COLUMN1 ||'~'||COLUMN2||'~', p_attributes => 'class="your_class_name" id="f01_'||ROWNUM||'"', p_checked_values => :P1_ITEM_ID_LIST, p_checked_values_delimiter => ',')

2. Create collection

BEGIN
apex_collection.CREATE_OR_TRUNCATE_COLLECTION ('YOUR_COLLECTION_NAME');
COMMIT;

for i in 1..apex_application.g_f01.count loop
apex_collection.add_member(
p_collection_name => 'YOUR_COLLECTION_NAME',
p_c001 =>(regexp_substr(apex_application.g_f01(i), '([^~]*)(~|$)', 1, 2, NULL, 1)),
p_c002 =>(regexp_substr(apex_application.g_f01(i), '([^~]*)(~|$)', 1, 3, NULL, 1))
);
end loop;
COMMIT;
END;

the checkbox2 value column1 and column2 values are stored in single checkbox2 value, we are inserting the data we will split the column1 and column value for this type.

Advertisements