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!

APEX_COLLECTION.UPDATE_MEMBER

SmithJohn45Jul 23 2024 — edited Jul 23 2024

on a page i have 2 regions, first one is Static contains Text Field and a Button (Defined by Dynamic Action).
second is Classic Report which will populate and render with Collections.

i have Collection populated on page load as below: On Page Load → Execute Server-side Code

BEGIN
 if not APEX_COLLECTION.COLLECTION_EXISTS('SALES') then
    APEX_COLLECTION.CREATE_COLLECTION ('SALES');
 end if;
 --
APEX_COLLECTION.ADD_MEMBER (
   p_collection_name => 'SALES',
   P_C001  =>  '001',
   P_C002  =>  'Tested',
);
APEX_COLLECTION.ADD_MEMBER (
p_collection_name => 'SALES',
P_C001 => '002',
P_C002 => 'Tested',
);
END;

Query to populate CR… this showing data

SELECT c.seq_id SL, 
      c.C001 CODE,
      c.C002 NAME 
FROM APEX_COLLECTIONS
WHERE COLLECTION_NAME = 'SALES'

on Button DA first True Action Code -Execute Server-side Code- to Update Collection: ( if it is correct and permissible for this scenario )

DECLARE
 xx number:=0;
 disc number:=0;
BEGIN
for rec in (Select seq_id
             From APEX_COLLECTIONS WHERE COLLECTION_NAME = 'SALES')
loop 
   APEX_COLLECTION.UPDATE_MEMBER (
     p_collection_name => 'SALES',
     p_seq   => rec.seq_id,
     P_C002  => 'Not Tested'
   );
end loop;
end;

DA 2nd Action is to refresh CR region, after this CR region is blank, nothing showing anything.
what i am doing wrong here? please help.
regards

This post has been answered by jariola on Jul 23 2024
Jump to Answer
Comments
Post Details
Added on Jul 23 2024
6 comments
493 views