Greetings Everyone - I'm using APEX 4.1 and have implemented a "Copy Record" button that copies selected fields from the record back to the same page to create a new record. This is done using branching (got the idea from this forum!)It's not a good one...
and setting the items (e.g., P2_NAME,P2_ADDRESS1,P2_ADDRESS2, etc...) with these values (e.g., &P2_NAME.,&P2_ADDRESS1.,&P2_ADDRESS2., etc...)As well as this problem you'll hit similar ones with other URL-reserved characters, and could hit problems with limits on URL length (IE only allows for about 2K).
It has worked perfectly in other APEX applications -- up until now. The issue is that the new database contains several fields that contain the "#" character. When the "#" character is encountered during the copying process, any data after the # are not copied (but all of the data before the # are copied OK).
Is there a way to get around this? Removing the "#" characters is not an option, as it is part of numerous manufacturer part numbers that we track.Do it properly using a page process.
Any guidance is appreciated. Thanks in advance for your help - Gail
The after submit PL/SQL process to write the collection record is:
BEGIN IF wwv_flow_collection.collection_exists('MY_COL') THEN -- Get the record I wrote using Apex_Collection.Add_Member in the after submit process -- if the collection exists and put the data into the page items SELECT c001, c002, .... INTO :P1_ITEM1, :P1_ITEM2,..... FROM apex_collections WHERE collection_name = 'MY_COL' AND SEQ_ID=1; -- Toss the collection wwv_flow_collection.delete_collection('MY_COL'); END IF; END;
BEGIN -- Even though the collection shouldn't be there, get rid of it if it is. IF wwv_flow_collection.collection_exists('MY_COL') THEN wwv_flow_collection.delete_collection('MY_COL'); END IF; -- Create the Collection apex_collection.create_or_truncate_collection('MY_COL'); -- Add one record to the collection loading the page item data into the VARCHAR2 columns -- Note there are 5 columns available for numbers, a clob, and a blob, see below -- SEQ_ID (See collection columns list below) will be set to 1 apex_collection.add_member('MY_COL', p_c001=>:P1_ITEM1, p_c002=>:P1_ITEM2,... ); **** Edit **** This could also be loaded using the Create collection from query,which after re-reading your original request is likely what you're looking for END;
Edited by: Bob37 on Aug 15, 2012 10:54 AM
The collection record consists of these columns COLLECTION_NAME NOT NULL VARCHAR2(255) SEQ_ID NOT NULL NUMBER C001 VARCHAR2(4000) C002 VARCHAR2(4000) C003 VARCHAR2(4000) C004 VARCHAR2(4000) C005 VARCHAR2(4000) ... C050 VARCHAR2(4000) N001 NUMBER N002 NUMBER N003 NUMBER N004 NUMBER N005 NUMBER CLOB001 CLOB BLOB001 BLOB XMLTYPE001 XMLTYPE MD5_ORIGINAL VARCHAR2(4000)