Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

DV parameters and unescaped apostrophes

Accepted answer
71
Views
4
Comments

Hi: Is there a way to individually enclose or otherwise "fix" DV parameter values in a delimited list of strings? I'm finding it difficult to handle invalid strings formed by unescaped apostrophes, like, 'O'TOOLE','O'GRADY','D'ADDARIO'

As long as the string values are properly enclosed, I seem to be able to use Logical SQL in a secondary parm to 1) concatenate multiple values (by inserting concat. operators as delimiters) and 2) apply REPLACE logic to handle specific characters & substrings (as for URL navigation).

REPLACE(@parameter("pv_myParm", style="delimited", separator="||','||")('a&b','c&d'), '', '%26')

Thanks! Open of course to more robust, less cumbersome approaches! 😅

Best Answer

  • @M.K.Mori - Thank you for your feedback.
    I your intention is a product improvement (enhancement), then please search the Ideas Lab. If an existing request is posted, please up-vote and comment on it. If not, please create a new Idea.

    https://community.oracle.com/products/oracleanalytics/categories/idealab-oracle-analytics-cloud-server

Answers

  • Thank you for asking your question in the Oracle Analytics Community. We are trying to find an answer for you, meanwhile, any other user is welcome to share their experience with this question.

  • Not exactly clear on how your parameter is setup based on what you have described, but if you are trying to create a calculation you could try to escape the single quotes by using a double single quote in place of the unescaped single quotes (i.e. 'O''TOOLE','O''GRADY','D''ADDARIO').

    Other comments welcomed.

  • M.K.Mori
    M.K.Mori Rank 3 - Community Apprentice

    I've had more hands-on experience with the Data Actions now! :)

    It looks like the Data Action URL Navigation does %-escape "special characters". It appears to be doing something like encodeURI() to the whole URI (?), which does not encode characters related to the query part (second line, esp. ? and = and &):

    A–Z a–z 0–9 - _ . ! ~ * ' ( )
    
    ; / ? : @ & = + $ , #
    

    It would be helpful at some point if we could apply—but only to the query arguments—encoding like the more aggressive encodeURIComponent(), which excludes only the following:

    A–Z a–z 0–9 - _ . ! ~ * ' ( )
    

    Fwiw!