7.51 UPDATE_MEMBERS Procedure

Use this procedure to update the array of members for the given named collection. If a collection does not exist with the specified name for the current user in the same session and for the current Application ID, an application error is raised. The count of elements in the p_seq PL/SQL table is used as the total number of items across all PL/SQL tables. That is, if p_seq.count = 2 and p_c001.count = 10, only 2 members are updaapex_application_globalted. If p_seq is null, an application error is raised. If the member specified by sequence ID p_seq does not exist, an application error is raised.

Syntax

APEX_COLLECTION.UPDATE_MEMBERS (
    p_collection_name IN VARCHAR2,
    p_seq  IN apex_application_global.VC_ARR2 DEFAULT empty_vc_arr,
    p_c001 IN apex_application_global.VC_ARR2 DEFAULT empty_vc_arr,
    p_c002 IN apex_application_global.VC_ARR2 DEFAULT empty_vc_arr,
    p_c003 IN apex_application_global.VC_ARR2 DEFAULT empty_vc_arr,
    ...
    p_c050 IN apex_application_global.VC_ARR2 DEFAULT empty_vc_arr,
    p_n001 IN apex_application_global.N_ARR DEFAULT empty_n_arr,
    p_n002 IN apex_application_global.N_ARR DEFAULT empty_n_arr,
    p_n003 IN apex_application_global.N_ARR DEFAULT empty_n_arr,
    p_n004 IN apex_application_global.N_ARR DEFAULT empty_n_arr,
    p_n005 IN apex_application_global.N_ARR DEFAULT empty_n_arr,
    p_d001 IN apex_application_global.D_ARR DEFAULT empty_d_arr,
    p_d002 IN apex_application_global.D_ARR DEFAULT empty_d_arr,
    p_d003 IN apex_application_global.D_ARR DEFAULT empty_d_arr,
    p_d004 IN apex_application_global.D_ARR DEFAULT empty_d_arr,
    p_d005 IN apex_application_global.D_ARR DEFAULT empty_d_arr)

Parameters

Note:

Any character attribute exceeding 4,000 characters is truncated to 4,000 characters. Also, the number of members added is based on the number of elements in the first array.

Table 7-27 UPDATE_MEMBERS Parameters

Parameter Description

p_collection_name

The name of the collection to update. Maximum length is 255 bytes. Collection names are not case sensitive and are converted to upper case.

p_seq

Array of member sequence IDs to be updated. The count of the p_seq array is used across all arrays.

p_c001 through p_c050

Array of attribute values to be updated.

p_n001 through p_n005

Attribute value of numeric

p_d001 through p_d005

Array of date attribute values to be updated.

Example

DECLARE
    l_seq   apex_application_global.vc_arr2;
    l_carr  apex_application_global.vc_arr2;
    l_narr  apex_application_global.n_arr;
    l_darr  apex_application_global.d_arr;
BEGIN
    l_seq(1)  := 10;
    l_seq(2)  := 15;
    l_carr(1) := 'Apples';
    l_carr(2) := 'Grapes';
    l_narr(1) := 100;
    l_narr(2) := 150;
    l_darr(1) := sysdate;
    l_darr(2) := sysdate;
 
    APEX_COLLECTION.UPDATE_MEMBERS (
        p_collection_name => 'Groceries',
        p_seq  => l_seq,
        p_c001 => l_carr,
        p_n001 => l_narr,
        p_d001 => l_darr);
END;