Search code examples
sqloracleurloracle-apexoracle-apex-19.1

apex_page.get_url pass item value which have colon(:) delimited list


I use apex_page.get_url to prepare url in sql query in that way:

'javascript:window.open("'||apex_page.get_url(p_page=>'9', p_items=>'P9_A,P9_B,P9_C,P9_D,P9_E', 
p_values=> Z.COLUMN_VAL||','||:P8_B||','||:P8_C||','||:P8_D||','||:P8_E, 
p_clear_cache=> '9') ||'" ,"_blank")' as LINKDETAIL

but P8_D item is a checkbox and it have colon(:) delimited list so when I navigate through this URl values not pass properly of this item and the item next to it which P8_E so then I try to use with \P8_D\ but it gives syntax error on browser.

'javascript:window.open("'||apex_page.get_url(p_page=>'9', p_items=>'P9_A,P9_B,P9_C,P9_D,P9_E', 
p_values=> Z.COLUMN_VAL||','||:P8_B||','||:P8_C||','||'"\\"'||:P8_D||'"\\"'||','||:P8_E, 
p_clear_cache=> '9') ||'" ,"_blank")' as LINKDETAIL

but not work with this singe \ or double \. Please suggest what might be going wrong.


Solution

  • Try concatenating an extra colon after the multivalue item. Here is an example:

    APEX_PAGE.GET_URL (
                p_page   => :APP_PAGE_ID,
                p_items  => 'P246_ENAME,P246_FAVORITE_DEPTS',
                p_values => :P246_ENAME||','||:P246_FAVORITE_DEPTS||':' )