This content has been marked as final. Show 21 replies
Enclose the string in backslashes
pass it as \120030/2012-04\
Thans for your quick response. I am a newbie to APEX. I passed the values in the "Action when button clicked" section of the calling page using
set these items (P37_DOCKET_NUM,P37_PO_NUM)
with these values(&P37_DOCKET_NUM.,&P37_PO_NUM.)
How do I do what you suggested in this case.
It may not apply in this case for you, but it is good practice to pass as little information through URL's as possible. Meaning that if you can pass some key identifier that will allow you to do a query on the page you are redirecting to and look up the other information that you want on the new page, that is the preferred method.
set these items (P37_DOCKET_NUM,P37_PO_NUM) with these values(\&P37_DOCKET_NUM.\,\&P37_PO_NUM.\)
I strongly suggest avoiding passing string values in the URL - i ran into issues in the past with trying to pass them in the URL but there were countless characters that ended up causing issues. Instead, why dont you have a page process that sets the page values accordingly. Either on the new page as before header, or on the original page as on submit.
:P<new_page>ITEM := :P<oldpage>_ITEM;
Or just have computations on the new page, based on page items, which are from the other page.
I have tried both methods mentioned above and neither works.
Sorry bout that. We do it all the time with links we build up; I thought it would work from the Set These Items With These Values area
Well, This method will work, and you can pass anything you want up to the size limits of the collection column sizes
On the current page, create an after submit PL/SQL procedure as the last procedure in the sequence right before branching. This will put your source item values into an Apex Collection.
On the Target Page, create a Before or After Header procedure to obtain the values you passed in the collection.
DECLARE l_collection_name CONSTANT VARCHAR2(255) := WWV_FLOW.G_INSTANCE; -- WWV_FLOW.G_INSTANCE is your user session number and will keep the collections per user session BEGIN IF APEX_COLLECTION.COLLECTION_EXISTS(p_collection_name => l_collection_name) THEN APEX_COLLECTION.DELETE_COLLECTION(p_collection_name => l_collection_name); END IF; APEX_COLLECTION.CREATE_COLLECTION(p_collection_name => l_collection_name); APEX_COLLECTION.ADD_MEMBER( p_collection_name => l_collection_name, p_c001 => :Page_Item1, p_c002 => :Page_Item2 ); END;
Too bad we can't just put it in the branch setup.
Select c001, c002 INTO :Target_Page_Item1, :Target_Page_Item2 From APEX_COLLECTIONS Where COLLECTION_NAME = WWV_FLOW.G_INSTANCE AND SEQ_ID = 1
Edited by: Bob37 on Mar 19, 2012 8:31 AM
Thanks. I will try that out. The pages are loaded on apex.oracle.com, if you want to take a look, the link is
Let me know if you have any trouble getting it to work, If so, I'll need a userid, workspace name, password, etc.
Collections are pretty easy once you've worked with them and the documentation is very good. http://www.oracle.com/pls/apx41/search?remark=quick_search&word=collections&partno=
getting error receiving page. Here's the credentials
userid : firstname.lastname@example.org
What are the source and target pages? I don't see any pages with the procedures on them.
Edited by: Bob37 on Mar 19, 2012 10:05 AM
The source page P37
I did it on my test server at home. sorry I didnt mention that. I am trying to pass DOCKET_NUM and PO_NUM from page 37 to page 6. Branching to page 6 using the Add_Jobs button
One thing I noticed is on the Set These Items on the Add_Jobs button, you had \P6_PO_NUM\. The backslashes do not belong there, only on the With These Items. I removed those backslashes from around P6_PO_NUM. You might see if that works now. If so. Great. You're done?
Otherwise here is what you need to do to get the collection process to work
On Page 37 then:
-You would change the Add_Jobs to Submit the page, not redirect. Remove the redirect stuff as well.
-Create the after Submit Process which creates the collection record as described above. Substitute your Page Item Names
-Have a branch which fires on the Add_Jobs button and redirects to Page 6 without passing any values.
On Page 6:
Create an After Header PL/SQL process as described above, which is the Select c001, c002..... to pick up the values you are passing. Substitute your page item names in place of the "target_page_items".
What you're doing is using the Apex Collections, thinking of them as a temporary table, where you're writing the values you want to pass into standard table columns and then reading the temporary table to pick up the values on the other side (page 6), where Apex branching and URL building isn't going to have any affect on the data.
By the way, I just tested this in my app, and it worked fine. I was assuming when you said it didn't work, it was something basic rather than your setup.
So, I'm now assuming when you said it didn't work, it was because you had \'s around the P6_PO_NUM in the Set These Items.
set these items (P6_DOCKET_NUM,P6_PO_NUM) with these values(\&P37_DOCKET_NUM.\,\&P37_PO_NUM.\)
Try that again and see if that works for you based on your original setup without any backslashes in the Set These Items specifications
I am getting this error on page 6
ORA-01722: invalid number
Technical Info (only visible for developers)
ora_sqlerrm: ORA-01722: invalid number
ORA-06512: at "SYS.WWV_DBMS_SQL", line 904
ORA-06512: at "APEX_040100.WWV_FLOW_DYNAMIC_EXEC", line 618
ORA-06512: at "APEX_040100.WWV_FLOW_PROCESS", line 128