<?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 Re: how to escape a semicolon? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17525#M1185</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you are correct.&amp;nbsp; It seems that using the variable inside of $( ) triggers the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I finally decided to give up on using trace for debugging and instead just try loading my data and seeing what happened.&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15185426261421373 jive_text_macro" jivemacro_uid="_15185426261421373" modifiedtitle="true"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let a = 'Hey ; there ';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Set GeneratePhotoHTML = 'Pretend this ' &amp;amp; $1 &amp;amp; ' is ' &amp;amp; $2 &amp;amp; ' ;HTML';&lt;/P&gt;
&lt;P&gt;SomeTable:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProblemNo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(GeneratePhotoHTML(ProblemNo, 'A')) AS PhotoA,&amp;nbsp; // I was not expecting this to work, but it does&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Hello ; World' AS PhotoB,&amp;nbsp; // also works&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(a) AS PhotoC;&amp;nbsp; // does not work&lt;/P&gt;
&lt;P&gt;SELECT&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm going to put the real code in there and make sure it still works.&amp;nbsp; I might be good to go despite this bug.&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;I'm confused but not at all surprised.&amp;nbsp; I already knew that Qlik's set/let/string/number/literal/variable/dollar-sign-expansion/trace system was a total mess.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Feb 2018 17:27:41 GMT</pubDate>
    <dc:creator>mmarchese</dc:creator>
    <dc:date>2018-02-13T17:27:41Z</dc:date>
    <item>
      <title>how to escape a semicolon?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17517#M1177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I'm trying to build a string with a semicolon in it.&amp;nbsp; Is it possible?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Here are my failed attempts, which all produce this error: "Unknown statement: World".&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15185380981503955" jivemacro_uid="_15185380981503955" modifiedtitle="true"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let a = 'Hello ; World';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Trace $(a);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let a = 'Hello ' &amp;amp; chr(59) &amp;amp; ' World';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Trace $(a);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let a = Replace('hello ~ World', '~', chr(59));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Trace $(a);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let a = 'Hello ;; World';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Trace $(a);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let a = 'Hello \; World';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Trace $(a);&lt;/SPAN&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;The last 2 were just desperate grasps at straws based on the fact that quotes can be escaped by doubling them up (even though the syntax highlighter has no clue).&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I also tried using Set instead of Let and then doing the Let in a second step, with the same outcome:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15185382884696483" jivemacro_uid="_15185382884696483"&gt;
&lt;P&gt;Set a = 'hello ' &amp;amp; chr(59) &amp;amp; ' there';&lt;/P&gt;
&lt;P&gt;Let b = $(a);&lt;/P&gt;
&lt;P&gt;Trace $(b);&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;For reference, the same statements work fine if I use a colon instead.&amp;nbsp; They print "Hello : World".&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15185381048089005" jivemacro_uid="_15185381048089005" modifiedtitle="true"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let a = 'Hello : World';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Trace $(a);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let a = 'Hello ' &amp;amp; chr(58) &amp;amp; ' World';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Trace $(a);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let a = Replace('Hello ~ World', '~', chr(58));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Trace $(a);&lt;/SPAN&gt;&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 16:19:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17517#M1177</guid>
      <dc:creator>mmarchese</dc:creator>
      <dc:date>2018-02-13T16:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to escape a semicolon?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17518#M1178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works on the front end, are you specifically looking to make this work in the script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET a = 'Hello @ World';&lt;/P&gt;&lt;P&gt;SET b = '=Replace(''$(a)'', ''@'', '';'')';&lt;/P&gt;&lt;P&gt;TRACE $(a);&lt;/P&gt;&lt;P&gt;TRACE $(b);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 16:27:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17518#M1178</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-13T16:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to escape a semicolon?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17519#M1179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I copied and pasted that in and it does not work for me.&amp;nbsp; Everything after the final closing parenthesis in the 2nd line is highlighted in red.&amp;nbsp; Maybe this was expected?&amp;nbsp; I don't know - not sure what you mean by the front end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The end goal is to use it in a load statement to make 3 new columns based on 2 existing columns.&amp;nbsp; The new columns are HTML for use with an extension that shows images in a table (and also accepts raw HTML).&amp;nbsp; The problem is that the HTML has a semicolon in it and Qlik hates it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to make a little function to do the string substitution and then call the function 3 times.&amp;nbsp; A simplified example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15185400262412645" jivemacro_uid="_15185400262412645"&gt;
&lt;P&gt;Set GeneratePhotoHTML = 'Pretend this ' &amp;amp; $1 &amp;amp; ' is ' &amp;amp; $2 &amp;amp; ' ;HTML';&lt;/P&gt;
&lt;P&gt;SomeTable:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProblemNo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(GeneratePhotoHTML(ProblemNo, 'A')) AS PhotoA,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(GeneratePhotoHTML(ProblemNo, 'B')) AS PhotoB,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(GeneratePhotoHTML(ProblemNo, 'C')) AS PhotoC&lt;/P&gt;
&lt;P&gt;SELECT&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got this idea from here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/261536"&gt;User-defined functions equivalent in Qlik Sense&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 16:41:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17519#M1179</guid>
      <dc:creator>mmarchese</dc:creator>
      <dc:date>2018-02-13T16:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to escape a semicolon?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17520#M1180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like a bug to me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;temp:LOAD 'Hello ; World' as Value AutoGenerate 1;&lt;/P&gt;&lt;P&gt;LET a = peek('Value',-1,'temp');&lt;/P&gt;&lt;P&gt;DROP TABLE temp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 16:45:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17520#M1180</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-02-13T16:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to escape a semicolon?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17521#M1181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It doesn't work for me.&amp;nbsp; I still get the error "Unknown statement: World".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 16:54:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17521#M1181</guid>
      <dc:creator>mmarchese</dc:creator>
      <dc:date>2018-02-13T16:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to escape a semicolon?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17522#M1182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which version of Qlik Sense?&lt;/P&gt;&lt;P&gt;September 2017 release works for me here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 16:58:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17522#M1182</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-02-13T16:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to escape a semicolon?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17523#M1183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems that setting the variable isn't erroring out, it is using the variable which is causing the trouble, is that right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running this along did not throw any error&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LET a = 'Hello ; World';&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 16:58:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17523#M1183</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-02-13T16:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to escape a semicolon?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17524#M1184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have June 2017.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:04:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17524#M1184</guid>
      <dc:creator>mmarchese</dc:creator>
      <dc:date>2018-02-13T17:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to escape a semicolon?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17525#M1185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you are correct.&amp;nbsp; It seems that using the variable inside of $( ) triggers the error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I finally decided to give up on using trace for debugging and instead just try loading my data and seeing what happened.&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15185426261421373 jive_text_macro" jivemacro_uid="_15185426261421373" modifiedtitle="true"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Let a = 'Hey ; there ';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Set GeneratePhotoHTML = 'Pretend this ' &amp;amp; $1 &amp;amp; ' is ' &amp;amp; $2 &amp;amp; ' ;HTML';&lt;/P&gt;
&lt;P&gt;SomeTable:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ProblemNo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(GeneratePhotoHTML(ProblemNo, 'A')) AS PhotoA,&amp;nbsp; // I was not expecting this to work, but it does&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Hello ; World' AS PhotoB,&amp;nbsp; // also works&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(a) AS PhotoC;&amp;nbsp; // does not work&lt;/P&gt;
&lt;P&gt;SELECT&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm going to put the real code in there and make sure it still works.&amp;nbsp; I might be good to go despite this bug.&amp;nbsp; &lt;SPAN style="font-size: 10pt;"&gt;I'm confused but not at all surprised.&amp;nbsp; I already knew that Qlik's set/let/string/number/literal/variable/dollar-sign-expansion/trace system was a total mess.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:27:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/17525#M1185</guid>
      <dc:creator>mmarchese</dc:creator>
      <dc:date>2018-02-13T17:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to escape a semicolon?</title>
      <link>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/1658497#M49317</link>
      <description>&lt;P&gt;Bit late, but to be complete and as a reference for other people landing here ... did you all realize that mmarchese used the expanding mechanism after a "TRACE"? Trace does accept everything "up to the next semicolon" as argument. So - indeed - the problem was the way mmarchese used the $()-expansion of the variable. And this also applies to the LOAD statement examples. In both cases single quotes surrounding the $() - like "Trace '$(a)';" or "'$(GeneratePhotoHTML(ProblemNo, ''A''))' AS PhotoA," (double ' inside '...' to encode a single ' inside a string) - should fix the problem (did not check that but am quite sure). However Trace will include the single quotes into it's logging output - a little fly in the ointment so to speak (I found this searching for an Idea to fix that).&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 13:09:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/how-to-escape-a-semicolon/m-p/1658497#M49317</guid>
      <dc:creator>NoEyeDeer</dc:creator>
      <dc:date>2019-12-17T13:09:53Z</dc:date>
    </item>
  </channel>
</rss>

