<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is Comment symbol in string malformed in Replace() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Is-Comment-symbol-in-string-malformed-in-Replace-function/m-p/59250#M9838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To implement a conditional object display, i.e. show Bar chart when vThreshold &amp;lt;= 2000. &lt;SPAN style="font-size: 10pt;"&gt;I defined an externalized variable expression in load script (background is all variables and conditional expression will be defined externally):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15266596408317143" jivemacro_uid="_15266596408317143"&gt;
&lt;P&gt;let vShow_Object = replace(replace('@(vThreshold) &amp;lt;= 2000 //code comment','~~~', chr(39)), '@(', chr(36) &amp;amp; '(');&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the main concern is should I use this approach to comment expression having "//code comment" in replace() as source text.&lt;/P&gt;&lt;P&gt;Tested in Qlikview, I don't see any problem and replace() works perfectly to ignore "//" symbol and this is what it parsed in Qlikview:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="expression.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/202828_expression.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Removing string "//code comment" is easy, &lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;just want to discuss if it will cause any problem in the future&lt;/STRONG&gt;&lt;/SPAN&gt; when using replace() function combined with Comment symbol (//) in source text.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 May 2018 16:40:13 GMT</pubDate>
    <dc:creator>leonard_wei</dc:creator>
    <dc:date>2018-05-18T16:40:13Z</dc:date>
    <item>
      <title>Is Comment symbol in string malformed in Replace() function</title>
      <link>https://community.qlik.com/t5/QlikView/Is-Comment-symbol-in-string-malformed-in-Replace-function/m-p/59250#M9838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To implement a conditional object display, i.e. show Bar chart when vThreshold &amp;lt;= 2000. &lt;SPAN style="font-size: 10pt;"&gt;I defined an externalized variable expression in load script (background is all variables and conditional expression will be defined externally):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15266596408317143" jivemacro_uid="_15266596408317143"&gt;
&lt;P&gt;let vShow_Object = replace(replace('@(vThreshold) &amp;lt;= 2000 //code comment','~~~', chr(39)), '@(', chr(36) &amp;amp; '(');&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now the main concern is should I use this approach to comment expression having "//code comment" in replace() as source text.&lt;/P&gt;&lt;P&gt;Tested in Qlikview, I don't see any problem and replace() works perfectly to ignore "//" symbol and this is what it parsed in Qlikview:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="expression.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/202828_expression.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Removing string "//code comment" is easy, &lt;SPAN style="color: #ff6600;"&gt;&lt;STRONG&gt;just want to discuss if it will cause any problem in the future&lt;/STRONG&gt;&lt;/SPAN&gt; when using replace() function combined with Comment symbol (//) in source text.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 May 2018 16:40:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-Comment-symbol-in-string-malformed-in-Replace-function/m-p/59250#M9838</guid>
      <dc:creator>leonard_wei</dc:creator>
      <dc:date>2018-05-18T16:40:13Z</dc:date>
    </item>
  </channel>
</rss>

