Sara
Sara

Reputation: 201

Update cell of APEX_COLLECTION in interactive grid

I have a interactive grid with a full join on the wwv_flow_qb_saved_query table and the apex_collection, like this:

Select
qbsq.ID,
qbsq.TITLE, 
qbsq.QB_SQL, 
qbsq.DESCRIPTION,
ac.collection_name,
ac.seq_id,
ac.C001 as new_TITLE, 
ac.CLOB001 as new_QB_SQL, 
ac.C002 as new_DESCRIPTION
FROM APEX_050100.WWV_FLOW_QB_SAVED_QUERY qbsq
full join apex_collections ac
on qbsq.TITLE = ac.C001

The result look like this: enter image description here

Now I need to make the possibility for users to change the title of the apex_collection, so the title in the "imported queries" column group. If the title is updated and different from the title of the existing queries, there would be a new grid entry.

I tried to do it in the "save interactive grid data" process => settings => target type => pl/sql code with

declare
collection_name varchar2(255);
seq_id number;
new_title varchar2(4000);

begin
    collection_name := :COLLECTION_NAME;
    seq_id := :SEQ_ID;
    new_title := :NEW_TITLE;

    case v('APEX$ROW_STATUS')
    when 'U' then
    APEX_COLLECTION.UPDATE_MEMBER_ATTRIBUTE (
        p_collection_name => collection_name,
        p_seq => seq_id,
        p_attr_number => 1,
        p_attr_value => new_title);
   end case;
end;

But something just doesn't work and I can't change the title. Am I missing something? Please could someone help me find the problem. I couldn't find any other helpful posts..

Thanks

Upvotes: 1

Views: 5649

Answers (2)

Sara
Sara

Reputation: 201

Thanks to Tony Andrews, for the solution I just had to change in the regions attributes the "Allowed Row Operations Column" to "null".

Upvotes: 2

Phanny
Phanny

Reputation: 221

WHy are you using collection? With IG you can modify data , change the pagination and return to the previous pagination , all your change will be there.

Upvotes: -1

Related Questions