Use this procedure to adjust the sequence ID of specified member in the given named collection up by one (add one), swapping sequence ID with the one it is replacing. For example, 2 becomes 3 and 3 becomes 2. 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. If the member specified by sequence ID p_seq does not exist, an application error is raised. If the member specified by sequence ID p_seq is the highest sequence in the collection, an application error is not returned.
APEX_COLLECTION.MOVE_MEMBER_UP ( p_collection_name IN VARCHAR2, p_seq IN NUMBER);
Table 5-21 MOVE_MEMBER_UP Parameters
The name of the collection. Maximum length is 255 bytes. Collection names are not case sensitive and are converted to upper case. An error is returned if this collection does not exist with the specified name of the current user in the same session.
Identifies the sequence number of the collection member to be moved up by one.
This example shows how to a member of the
EMPLOYEES collection down one position. After executing this example, sequence ID '5' becomes sequence ID '6' and sequence ID '6' becomes sequence ID '5'.
BEGIN; APEX_COLLECTION.MOVE_MEMBER_UP( p_collection_name => 'EMPLOYEES', p_seq => '5' ); END;