Apex – Column Linking with data that includes commas

February 5, 2008

You want to define a link between one page an another via a report column. Everything works great until you try a link where the source column value includes a comma, like:

Smith, Fred, A.

Then the link doesn’t work!

I found the answer in the Oracle Apex forum. This is documented in the 3.0 User Guide under itemValues as:

To pass a comma in an item value, enclose the characters
with backslashes. For example:
\123,45\

You need to put ‘\’ (backslash, not slash) on both sides of the column value you’re passing, simple as that. You don’t need to change the query on the receiving end at all.
Forum user Chet Justice even wrote up a sample query:

SELECT my_column_with_commas, –use this one to display
‘\’ || my_column_with_commas || ‘\’ my_commas –user this one for the link
FROM table_with_columns_of_commas;

Then change your column link to pass the my_commas value.

Piece of cake, once you know!

5 Responses to “Apex – Column Linking with data that includes commas”

  1. Gauri Says:

    Hey Stewstryker,

    This tip helped 🙂 Do you have any pointers on how I can pass ampersands (&) in item values? I have a select list with names of companies, like “ABC & Sons” and I need to pass these values into a page item.

    Any help appreciated.

  2. Stew Says:

    Gauri,

    I guess I’d try it as you presented it & amp ;. What happens when you try that? You’d need to decode it with a calculation on the receiving end.

    Another idea that comes to mind would be to encode it to some other character sequence before passing then decode after passing.

  3. Andy Says:

    Perfect – Thank you!

    in column link I now have: \#LINK_TO_MAP#\ and this works perfectly.

  4. Asik Hasan Evan Says:

    only when i put \ (backslash) in url link-value, it works perfectly. thanks.
    Example: \#report_column#\

  5. Rinaldo Wurglitsch Says:

    You saved my day!


Leave a reply to Rinaldo Wurglitsch Cancel reply