Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Checkbox solution to insert into a table based on options selected

James LangranJul 3 2019 — edited Jul 3 2019

Hi,

I'm trying to create a menu function where you use a checkbox to select from a list and the options you tick get copied to another table

I'm almost there but I'm stuck on how to stipulate it's the 3 (for example) I've ticked I want copied rather than the top 3 (because I have 3 ticks and it's just looping down from the top)

SQL Query which creates my menu with checkbox (1) and data I want copied if (1) checked as description (2)

select ID,

NUMBER_,

RAID_TYPE,

AREA,

apex_item.DISPLAY_AND_SAVE (2,DESCRIPTION) as Description,

apex_item.checkbox(1,ID, decode(AREA,'Y','checked','unchecked')) as checkbox

from TB_EXAMPLE_RAID

What I run when triggered (can't work out where to define 1)

BEGIN

FOR i in 1..apex_application.g_f01.count 

LOOP

  INSERT INTO T_COMMENTS (COMMENT_TEXT,REFERENCE_TYPE)

VALUES (apex_application.g_f02(i), 'TEST2');

END LOOP; 

NULL;

END;

Comments
Post Details
Added on Jul 3 2019
1 comment
1,559 views