<?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 set variable from text file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-variable-from-text-file/m-p/321019#M118274</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wating to create a set statement that pulls information from an external text file in the load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So rather than:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set x='May, June, July'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the 'May, June, July' to come from a text file stored locally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gareth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Aug 2011 09:57:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-01T09:57:27Z</dc:date>
    <item>
      <title>set variable from text file</title>
      <link>https://community.qlik.com/t5/QlikView/set-variable-from-text-file/m-p/321019#M118274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wating to create a set statement that pulls information from an external text file in the load script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So rather than:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set x='May, June, July'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the 'May, June, July' to come from a text file stored locally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gareth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 09:57:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-variable-from-text-file/m-p/321019#M118274</guid>
      <dc:creator />
      <dc:date>2011-08-01T09:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: set variable from text file</title>
      <link>https://community.qlik.com/t5/QlikView/set-variable-from-text-file/m-p/321020#M118275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Gareth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd do a concatenated load of all possible values in your text file (one value per file in the text file), using the code as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;ValuesTemp:&lt;/P&gt;&lt;P&gt;LOAD Chr(39) &amp;amp; Concat(Value, Chr(39 &amp;amp; Chr(44) &amp;amp; Chr(39)) &amp;amp; Chr(39) AS AllValues&lt;/P&gt;&lt;P&gt;FROM File.txt (txt, utf8, embedded labels, delimiter is '\t', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vVariable = FieldValue('AllValues', 1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE ValuesTemp;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The file is called file.txt and it has only one field named "Value". It takes more work than hardcoding the values but it may worth doing this to have a greater control in an external file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 10:10:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-variable-from-text-file/m-p/321020#M118275</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-08-01T10:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: set variable from text file</title>
      <link>https://community.qlik.com/t5/QlikView/set-variable-from-text-file/m-p/321021#M118276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please find the attached .use text file instead of excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;change the code accodingly will give u desired result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 11:29:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-variable-from-text-file/m-p/321021#M118276</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-08-01T11:29:39Z</dc:date>
    </item>
  </channel>
</rss>

