<?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 Pick function and string values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pick-function-and-string-values/m-p/241996#M501519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sander,&lt;/P&gt;&lt;P&gt;You were almost there. When it comes to literals or strings, you need to single quote them. There are two ways of doing that using variables, depending on whether the assignment is done by LET or SET:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;SET vLevelNames='Naam 1','Naam 2','Naam 3','Naam 4','Naam 5','Naam 6'; // This stores as a literal, not evaluating the content, s no need to use &amp;amp; between valuesLET vLevelNames = chr(39) &amp;amp; 'Naam 1' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 'Naam 2' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 'Naam 3' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 'Naam 4' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 'Naam 5' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 'Naam 6' &amp;amp; chr(39); // LET does evaluate the assignment, so chr(39) is translated into ' symbol, needed to quote the results in order to get Pick() working&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The LET option is cumbersome, but it may be useful in the future when you do need evaluation of the assignment.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Mar 2011 09:58:21 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2011-03-09T09:58:21Z</dc:date>
    <item>
      <title>Pick function and string values</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-function-and-string-values/m-p/241995#M501518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello al, I have some problems with the Pick function;&lt;/P&gt;&lt;P&gt;I make a string with several names in it which i want to use later on in a variable;&lt;/P&gt;&lt;P&gt;Scenario 1;&lt;/P&gt;&lt;P&gt;Let vLevelNames='Naam 1'&amp;amp;','&amp;amp;'Naam 2'&amp;amp;','&amp;amp;'Naam 3'&amp;amp;','&amp;amp;'Naam 4'&amp;amp;','&amp;amp;'Naam 5'&amp;amp;','&amp;amp;'Naam 6';&lt;/P&gt;&lt;P&gt;Let vLevelName=Pick(1,$(vLevelNames));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I Get the next error;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Error in expression:&lt;BR /&gt;')' expected&lt;BR /&gt;Let vLevelName=Pick(1,Naam 1,Naam 2,Naam 3,Naam 4,Naam 5,Naam 6)&lt;/P&gt;&lt;P&gt;Scenario 2;&lt;BR /&gt;Let vLevelNames='Naam 1'&amp;amp;','&amp;amp;'Naam 2'&amp;amp;','&amp;amp;'Naam 3'&amp;amp;','&amp;amp;'Naam 4'&amp;amp;','&amp;amp;'Naam 5'&amp;amp;','&amp;amp;'Naam 6';&lt;/P&gt;&lt;P&gt;Let vLevelName=Pick(1,$(vLevelNames));&lt;/P&gt;&lt;P&gt;I get no error and also na value for vLevelName&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Scenario 3;&lt;/P&gt;&lt;P&gt;Let vLevelNames=10&amp;amp;','&amp;amp;11&amp;amp;','&amp;amp;12&amp;amp;','&amp;amp;13&amp;amp;','&amp;amp;14&amp;amp;','&amp;amp;15;&lt;/P&gt;&lt;P&gt;Let vLevelName=Pick(1,$(vLevelNames));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Works perfectly, no errors and value 10 for vLevelName&lt;/P&gt;&lt;P&gt;Does anyone know why scenario 1 and 2 don't work, and what to do to get them work. Thnx in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetz Sander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 09:23:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-function-and-string-values/m-p/241995#M501518</guid>
      <dc:creator />
      <dc:date>2011-03-09T09:23:27Z</dc:date>
    </item>
    <item>
      <title>Pick function and string values</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-function-and-string-values/m-p/241996#M501519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sander,&lt;/P&gt;&lt;P&gt;You were almost there. When it comes to literals or strings, you need to single quote them. There are two ways of doing that using variables, depending on whether the assignment is done by LET or SET:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;SET vLevelNames='Naam 1','Naam 2','Naam 3','Naam 4','Naam 5','Naam 6'; // This stores as a literal, not evaluating the content, s no need to use &amp;amp; between valuesLET vLevelNames = chr(39) &amp;amp; 'Naam 1' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 'Naam 2' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 'Naam 3' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 'Naam 4' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 'Naam 5' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; 'Naam 6' &amp;amp; chr(39); // LET does evaluate the assignment, so chr(39) is translated into ' symbol, needed to quote the results in order to get Pick() working&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The LET option is cumbersome, but it may be useful in the future when you do need evaluation of the assignment.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 09:58:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-function-and-string-values/m-p/241996#M501519</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-03-09T09:58:21Z</dc:date>
    </item>
    <item>
      <title>Pick function and string values</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-function-and-string-values/m-p/241997#M501520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thnx, this is the solution!!&lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 10:10:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-function-and-string-values/m-p/241997#M501520</guid>
      <dc:creator />
      <dc:date>2011-03-09T10:10:02Z</dc:date>
    </item>
  </channel>
</rss>

