开发者

ApEx Form off an Oracle Apex Collection

Is it possible to create an Oracle Apex form (with automati开发者_开发问答c fetch row) based on an apex_collection?

If so, how?


No, because you can't insert, update and delete collection data directly, you have to call the apex_collectiom API.


You can create the collection in another page, or in the "Pre-Rendering->Before Header-> Process" in the page containing an interactive or classic report, with the SQL for the report similar to:

  SELECT c001 as comp_name, c002 as address, c003 as city, 
         n001 as zip_code, clob001 as comp details
   FROM APEX_collections
 WHERE collection_name = 'DEPARTMENTS'


But as mentioned in the other answer you will not be able to add/update/delete data.


The answer is NO because without using the apex_collecion API you cannot perform DML operations like insert, update, Delete.


declare
    l_order_id    number;
begin
    -- create collections
    --
    apex_collection.CREATE_OR_TRUNCATE_COLLECTION ('CUST_ORDER_ITEMS');


    -- Loop through the ORDER collection and insert rows into the Order Line Item table
    for i in 1..apex_application.g_f01.count loop
        apex_collection.add_member(
            p_collection_name => 'CUST_ORDER_ITEMS',
            p_c001            => to_number(apex_application.g_f01(i)), -- product_id
            p_c002            => to_number(apex_application.g_f02(i)), -- unit_price
            p_c003            => to_number(apex_application.g_f03(i)),  -- quantity
            p_c004            => apex_application.g_f04(i),  -- desc
            p_c005            => apex_application.g_f05(i)  -- unit
        );
    end loop;
end;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜