Hi there,
I am new to Apex and am attempting to use collections (similar to the Matrix sample).
I have carried out the following ;
On Page 2, I create a collection based on a query ;
BEGIN
if apex_COLLECTION.COLLECTION_EXISTS('S_ORDER') then
apex_COLLECTION.DELETE_COLLECTION('S_ORDER');
end if;
APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
p_collection_name => 'S_ORDER',
p_query => 'select PROJECT_CODE,SUPPLIER_CODE, MATERIAL_CODE, MATERIAL_DESCRIPTION, DEFAULT_UNIT,QTY from AC_SL_VIEW ' );
END;
On Page 3, I create a report with C006 as an editable field
select c001, c002, c003, c004, c005,nvl(c006,'0') c006 from apex_collections
where collection_name = 'S_ORDER'
and c002 =:p3_supplier
and c001 = :p2_project
I also update the collection as an ‘On Submit….’ Process as follows;
declare
c pls_integer := 0;
begin
for c1 in (
select seq_id from apex_collections
where collection_name = 'S_ORDER'
and c002 =:p3_supplier
and c001 = :p2_project
order by seq_id)
loop
c := c+1;
apex_collection.update_member_attribute (p_collection_name=> 'S_ORDER',
p_seq=> c1.seq_id,p_attr_number =>6,p_attr_value=>wwv_flow.g_f01(c));
end loop;
end;
When I attempt to display Page 4, all of my quantities are 0 (i.e C006 has not been updated)
SELECT c001, c002, c003, c004, c005,to_number(nvl(c006,'0')) c006
FROM apex_collections
where collection_name = 'S_ORDER'
and c002 =:p3_supplier
and c001 = :p2_project
Any ideas where I am going wrong?
Thanks a mill in advance
Rita
Edited by: 788265 on 13-Aug-2010 05:51
Edited by: 788265 on 13-Aug-2010 05:57