更新时间:2022-04-27 15:39:34
在我看来更容易使用apex_Item,如下所示:
在项目后添加交互式报表区域或子区域。
将IR SQL查询设置为:
SELECT
APEX_ITEM.TEXT(
p_idx => 1,
p_attributes=> 'placeholder="Comment '|| LEVEL ||'"') AS Name
FROM dual
CONNECT BY LEVEL <= TO_NUMBER (:P16_NUM)
;
:P16_NUM
是保存要显示的项数的项。不要忘记将其添加到IR"源"部分的"要提交的页面项目"中。
添加提交按钮。
在处理中创建新流程并迭代项目,如下所示:
BEGIN
apex_debug.enable;
for i in apex_application.g_f01.FIRST..apex_application.g_f01.LAST loop
apex_debug.info('####### Comment '||i||' '||apex_application.g_f01(i));
end loop;
END;
INSERT
:INSERT INTO vehicles(brand, model, comment)
VALUES(:P27_BRAND, :P27_MODEL, apex_application.g_f01(i));
BEGIN
for i in apex_application.g_f01.FIRST..apex_application.g_f01.LAST loop
INSERT INTO vehicles(brand, model, comment)
VALUES(:P27_BRAND, :P27_MODEL, apex_application.g_f01(i));
end loop;
END;
编辑