Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Encoding/Escaping & Decoding/Unescaping with JScript

New to Qlikview. I was trying to find a way to unescape data from a SQL database, here is my solution:

Jscript:

Open the Macro Editor and select JScript.

Encoding:

function encode( str ) {

  return encodeURI(str);

}

Decoding:

function decode( str ) {

  return decodeURI(str);

}

Escaping:

function escape( str ) {

  return escape(str);

}

Unescaping:

function unescape( str ) {

  return unescape(str);

}

In the script editor, when loading variables simply call the function:

LOAD var1,

          unescape(var2) as var 2,

          ..

          var10;

SQL ...

Hope this helps someone.

Regards,

Benjamin

0 Replies