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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
leonard_wei
Partner - Contributor II
Partner - Contributor II

Is Comment symbol in string malformed in Replace() function

Hello all,

To implement a conditional object display, i.e. show Bar chart when vThreshold <= 2000. I defined an externalized variable expression in load script (background is all variables and conditional expression will be defined externally):

let vShow_Object = replace(replace('@(vThreshold) <= 2000 //code comment','~~~', chr(39)), '@(', chr(36) & '(');

Now the main concern is should I use this approach to comment expression having "//code comment" in replace() as source text.

Tested in Qlikview, I don't see any problem and replace() works perfectly to ignore "//" symbol and this is what it parsed in Qlikview:

expression.png

Removing string "//code comment" is easy, just want to discuss if it will cause any problem in the future when using replace() function combined with Comment symbol (//) in source text.

0 Replies