Discussions
Categories
- 385.5K All Categories
- 5.1K Data
- 2.5K Big Data Appliance
- 2.5K Data Science
- 453.4K Databases
- 223.2K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 47 Multilingual Engine
- 606 MySQL Community Space
- 486 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.2K ORDS, SODA & JSON in the Database
- 585 SQLcl
- 4K SQL Developer Data Modeler
- 188K SQL & PL/SQL
- 21.5K SQL Developer
- 46 Data Integration
- 46 GoldenGate
- 298.4K Development
- 4 Application Development
- 20 Developer Projects
- 166 Programming Languages
- 295K Development Tools
- 150 DevOps
- 3.1K QA/Testing
- 646.7K Java
- 37 Java Learning Subscription
- 37.1K Database Connectivity
- 201 Java Community Process
- 108 Java 25
- 22.2K Java APIs
- 138.3K Java Development Tools
- 165.4K Java EE (Java Enterprise Edition)
- 22 Java Essentials
- 176 Java 8 Questions
- 86K Java Programming
- 82 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 208 Java User Groups
- 25 JavaScript - Nashorn
- Programs
- 667 LiveLabs
- 41 Workshops
- 10.3K Software
- 6.7K Berkeley DB Family
- 3.6K JHeadstart
- 6K Other Languages
- 2.3K Chinese
- 207 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 474 Portuguese
Handling comma while passing the parameter values from 1 page to another

I am facing a weird problem in APEX.
In page1, I created 2 pageitems of type textbox. Lets say P1_item_name and p1_description.I also created a submit button in Page 1. On submit i created branch to page2 and used a linkbuilder - target optionI created another page2 having 2 pageitem p2_item_name and p2_description where the data will be populated from the inputs in the page 1.
Now, when i enter a comma separated values in the page1 , in page2 only the value before comma is diplayed and value after comma is carryforwarded.
Eg: In p1_item_name i entered test,hello and p1_description as this,is,test,msg. On submit,
p2_item_name is populated as test , ideally it should be test,hello
p2_description as hello , ideally it should be this,is,test,msg
why is it not taking comma? If i use any other special character, it is working fine.
Any idea why is this happening? How to pass comma?
Thanks & Regards
Best Answers
-
It's because of how URLs are set up. The commas in the URL indicates which items will get which values. We actually faced a similar problem and found a solution. You can use a pre-rendering process on the target page and set the values of the previous page item to the target page.
Pre-rendering process (PL/SQL):
:P2_item_1 := :P1_item_1;
:P2_item_2 := :P1_item_2;
And give it a server-side condition so it executes only when getting redirected from page 1. For this you can use a single extra item on the target page and set it's value from the Branch of previous page.
Server-side condition:
:P2_STATUS = 'EXECUTE'
(set the 'EXECUTE' value from branch) -
why is it not taking comma? If i use any other special character, it is working fine.
Any idea why is this happening? How to pass comma?
Many characters are indeed "special" in the context of a Uniform Resource Identifier (URI). These characters have a specific purpose when used in APEX URLs or URIs in general.
As documented, in APEX URLs the
itemValues
parameter supports backslash escaping to enable values containing commas to be passed between pages. Change the Value in the link properties or URL to enclose the item reference in backslashes ("\"):\&P1_ITEM.\
In APEX 5.0 an undocumented enhancement was introduced to extend this to values containing colons, which previously could not be passed at all.
Note however that the safest and most secure approach is still to only pass numeric or alphanumeric key or UID values as URL parameters, and deal with expanding these into other required values in the target page.
Answers
-
It's because of how URLs are set up. The commas in the URL indicates which items will get which values. We actually faced a similar problem and found a solution. You can use a pre-rendering process on the target page and set the values of the previous page item to the target page.
Pre-rendering process (PL/SQL):
:P2_item_1 := :P1_item_1;
:P2_item_2 := :P1_item_2;
And give it a server-side condition so it executes only when getting redirected from page 1. For this you can use a single extra item on the target page and set it's value from the Branch of previous page.
Server-side condition:
:P2_STATUS = 'EXECUTE'
(set the 'EXECUTE' value from branch) -
why is it not taking comma? If i use any other special character, it is working fine.
Any idea why is this happening? How to pass comma?
Many characters are indeed "special" in the context of a Uniform Resource Identifier (URI). These characters have a specific purpose when used in APEX URLs or URIs in general.
As documented, in APEX URLs the
itemValues
parameter supports backslash escaping to enable values containing commas to be passed between pages. Change the Value in the link properties or URL to enclose the item reference in backslashes ("\"):\&P1_ITEM.\
In APEX 5.0 an undocumented enhancement was introduced to extend this to values containing colons, which previously could not be passed at all.
Note however that the safest and most secure approach is still to only pass numeric or alphanumeric key or UID values as URL parameters, and deal with expanding these into other required values in the target page.