<?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 Create a variable containing text &amp; a field reference in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-a-variable-containing-text-a-field-reference/m-p/231819#M502239</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I'm trying to set a variable containing the following:&lt;/P&gt;&lt;P&gt;vDim = 'Dimension_' &amp;amp; Axis&lt;/P&gt;&lt;P&gt;Where Axis refers to a field value either X or Y.&lt;/P&gt;&lt;P&gt;I can think of 3 options to create the variable with the assigned value:&lt;/P&gt;&lt;P&gt;1- In the script using the LET command&lt;/P&gt;&lt;P&gt;2- Directly in the variables overview window&lt;/P&gt;&lt;P&gt;3- Through a Set variable action in a button&lt;/P&gt;&lt;P&gt;The problem I have is that options 1 and 3 will store the result of the expression 'Dimension_' &amp;amp; Axis in the variable. Option 2 allows me to create the variable but I would have to re-create it every time the script is reloaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas of how to create the variable maintaining the expression and not the resulting value of the expression?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Dec 2010 14:59:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-12-23T14:59:12Z</dc:date>
    <item>
      <title>Create a variable containing text &amp; a field reference</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-variable-containing-text-a-field-reference/m-p/231819#M502239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I'm trying to set a variable containing the following:&lt;/P&gt;&lt;P&gt;vDim = 'Dimension_' &amp;amp; Axis&lt;/P&gt;&lt;P&gt;Where Axis refers to a field value either X or Y.&lt;/P&gt;&lt;P&gt;I can think of 3 options to create the variable with the assigned value:&lt;/P&gt;&lt;P&gt;1- In the script using the LET command&lt;/P&gt;&lt;P&gt;2- Directly in the variables overview window&lt;/P&gt;&lt;P&gt;3- Through a Set variable action in a button&lt;/P&gt;&lt;P&gt;The problem I have is that options 1 and 3 will store the result of the expression 'Dimension_' &amp;amp; Axis in the variable. Option 2 allows me to create the variable but I would have to re-create it every time the script is reloaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas of how to create the variable maintaining the expression and not the resulting value of the expression?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 14:59:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-variable-containing-text-a-field-reference/m-p/231819#M502239</guid>
      <dc:creator />
      <dc:date>2010-12-23T14:59:12Z</dc:date>
    </item>
    <item>
      <title>Create a variable containing text &amp; a field reference</title>
      <link>https://community.qlik.com/t5/QlikView/Create-a-variable-containing-text-a-field-reference/m-p/231820#M502240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you don't want the expression to be evaluated on the load, you can replace the ampersand with the Chr() function equavilent and the resulting variable will contain the ampersand.&lt;/P&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Let vDim = Chr(39) &amp;amp; 'Dimension_' &amp;amp; Chr(39) &amp;amp; Chr(38) &amp;amp; 'Axis';&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The Chr(39)s will put single quotes around Dimension_ and the Chr(38) will add the ampersand between them. The result of that expression should be:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;'Dimension_'&amp;amp;Axis&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You could also force spaces around the ampersand, but I don't think it is necessary.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 15:42:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-a-variable-containing-text-a-field-reference/m-p/231820#M502240</guid>
      <dc:creator />
      <dc:date>2010-12-23T15:42:03Z</dc:date>
    </item>
  </channel>
</rss>

