<?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: storing as string in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841585#M997927</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Using &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vGrossSales = 'FIELD={Gross Sales}';&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;should work fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Do you have reason to suspect it does not ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jun 2015 10:53:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-06-29T10:53:28Z</dc:date>
    <item>
      <title>storing as string</title>
      <link>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841583#M997925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;I wanted to store the below part of the expression in a variable-&lt;/P&gt;&lt;P&gt;FIELD={Gross Sales}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I see that it is written like below&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;LET vGrossSales = 'FIELD={'&amp;amp;Chr(39) &amp;amp; 'Gross Sales' &amp;amp;Chr(39) &amp;amp; '}';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;But not like-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LET vGrossSales = 'FIELD={Gross Sales}';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;why??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Also, Why we need chr(39) when 'gross sales' already has single cotes?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 10:34:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841583#M997925</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2015-06-29T10:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: storing as string</title>
      <link>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841584#M997926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no escape characters in qlikview. so we need to use chr() for quotes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 10:43:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841584#M997926</guid>
      <dc:creator />
      <dc:date>2015-06-29T10:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: storing as string</title>
      <link>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841585#M997927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Using &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vGrossSales = 'FIELD={Gross Sales}';&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;should work fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Do you have reason to suspect it does not ?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 10:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841585#M997927</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-06-29T10:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: storing as string</title>
      <link>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841586#M997928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suraj, in this expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;LET vGrossSales = '&lt;STRONG&gt;FIELD={&lt;/STRONG&gt;'&amp;amp;&lt;STRONG&gt;Chr(39)&lt;/STRONG&gt; &amp;amp; '&lt;STRONG&gt;Gross Sales&lt;/STRONG&gt;' &amp;amp;&lt;EM&gt;&lt;STRONG&gt;Chr(39)&lt;/STRONG&gt;&lt;/EM&gt; &amp;amp; '&lt;STRONG&gt;}&lt;/STRONG&gt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The bolded parts will be the result of the expression, so "Gross Sales" isn't between single quotes in the result, so you need to add the quotes using CHR(39).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Another way is to use double-single quotes as scape character but can be more confusing than using Chr():&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;LET vGrossSales = '&lt;STRONG&gt;FIELD={&lt;/STRONG&gt;'&lt;STRONG&gt;'Gross Sales&lt;/STRONG&gt;'&lt;STRONG&gt;'}&lt;/STRONG&gt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 10:57:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841586#M997928</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-06-29T10:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: storing as string</title>
      <link>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841587#M997929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, i didnt clearly understand what you said, could you please explain this statement..&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The bolded parts will be the result of the expression, so "Gross Sales" isn't between single quotes in the result--&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;For more infomation, I will be using the above varaible in my expression like below-&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;$(vGrossSales)&amp;gt;}sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 11:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841587#M997929</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2015-06-29T11:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: storing as string</title>
      <link>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841588#M997930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Suraj, you want your expression result as:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;FIELD={Gross Sales}&amp;gt;}sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;FIELD={'Gross Sales'}&amp;gt;}sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it's the second so to add the single quotes you need to add the Chr(39).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end of your first post you said "&lt;SPAN style="font-size: 10pt;"&gt;Also, Why we need chr(39) when 'gross sales' already has single cotes?", &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;I tried to clarify that the result expression wouldn't have single quotes if you avoid the Chr(39), other single quotes in that expression only delimiters strings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;LET vGrossSales = '&lt;STRONG&gt;FIELD={&lt;/STRONG&gt;'&amp;amp;&lt;STRONG&gt;Chr(39)&lt;/STRONG&gt; &amp;amp; '&lt;STRONG&gt;Gross Sales&lt;/STRONG&gt;' &amp;amp;&lt;EM&gt;&lt;STRONG&gt;Chr(39)&lt;/STRONG&gt;&lt;/EM&gt; &amp;amp; '&lt;STRONG&gt;}&lt;/STRONG&gt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;You can check the result without the Chr(39):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;LET vGrossSales = '&lt;STRONG&gt;FIELD={&lt;/STRONG&gt;'&amp;amp; '&lt;STRONG&gt;Gross Sales&lt;/STRONG&gt;' &amp;amp; '&lt;STRONG&gt;}&lt;/STRONG&gt;';&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 11:24:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841588#M997930</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2015-06-29T11:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: storing as string</title>
      <link>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841589#M997931</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;There is no escape characters in qlikview. so we need to use chr() for quotes.&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is no longer true - at least from 11.2 SR9. You can escape a single quote by entering it twice:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vGrossSales = 'FIELD={''Gross Sales''}';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this results in &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FIELD={'Gross Sales'}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 11:30:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841589#M997931</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-06-29T11:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: storing as string</title>
      <link>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841590#M997932</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;Thanks a lot for the explantion and clarification&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 11:59:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/storing-as-string/m-p/841590#M997932</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2015-06-29T11:59:44Z</dc:date>
    </item>
  </channel>
</rss>

