Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commas are not allowed inside page item value? APEX

I am trying to pass a full name from 1 page to another.

But when I type 'Tyler, Brown' inside my text field and redirect to the next page.

enter image description here

The value that is left becomes 'Tyler'

enter image description here

What does apex not allow commas inside value of page item?

is there a way to go around this?

like image 885
charlie tsai Avatar asked Jul 11 '17 22:07

charlie tsai


1 Answers

Commas are used to separate multiple item values in an Apex URL, e.g.

http://host/ords/f?p=100:1:1234567890::::P1_ITEM1,P1_ITEM2:value1,value2

Typically you shouldn't be passing user-entered data via the URL - e.g. save the value in a table and pass a system-generated ID for the record instead.

If you must pass a value like this via the URL, you can surround it with backslashes (\), e.g.

http://host/ords/f?p=100:1:1234567890::::P1_ITEM1,P1_ITEM2:\value1,with,commas\,value2

Source: https://stewstools.wordpress.com/2008/02/05/apex-column-linking-with-data-that-includes-commas/ (note: the links in this old article are dead, but I've tested the method myself on Apex 5 and it works)

like image 58
Jeffrey Kemp Avatar answered Oct 16 '22 22:10

Jeffrey Kemp