<?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 Variable Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043076#M920842</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a connection string in Txt file and calling it through include statement. And I have assigned a variable to this include statement using Let statement. But when I am calling the variable through $ expansion to use a connection sting it throwing an red error line. Please help me in this regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vtest=$(Include =C:\Users\Test\Desktop\Inlcude/Test.txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vtest);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hari:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * from Db;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>h_prakash</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043076#M920842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a connection string in Txt file and calling it through include statement. And I have assigned a variable to this include statement using Let statement. But when I am calling the variable through $ expansion to use a connection sting it throwing an red error line. Please help me in this regard.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set vtest=$(Include =C:\Users\Test\Desktop\Inlcude/Test.txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(vtest);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hari:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT * from Db;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043076#M920842</guid>
      <dc:creator>h_prakash</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043077#M920843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you need a variable? You can keep it simple by just specifying the following sequence:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;$(Include=&lt;SPAN style="color: #3d3d3d; font-size: 13px;"&gt;C:\Users\Test\Desktop\Include\Test.txt)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Hari:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SELECT * FROM Db;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works only on condition that your Test.txt file contains a full connect statement, like for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;OLEDB CONNECT TO [...];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 21:35:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043077#M920843</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-04-28T21:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043078#M920844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use "must include" in your load statement.&amp;nbsp; It will let you know if the load failed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 21:36:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043078#M920844</guid>
      <dc:creator>clondono</dc:creator>
      <dc:date>2016-04-28T21:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043079#M920845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An alternative way is to use a SET statement in the Include file that sets a variable to the actual Connection string. Test.txt may contain something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SET vConnectionString = '[...]';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and in your Load Script, you can use that variable like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'courier new', courier; font-size: 13px;"&gt;$(Include=&lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'courier new', courier; color: #3d3d3d;"&gt;C:\Users\Test\Desktop\Include\Test.txt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'courier new', courier; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'courier new', courier; color: #3d3d3d;"&gt;OLEDB CONNECT TO $(vConnectionString);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'courier new', courier; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;Hari:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: 'courier new', courier;"&gt;SELECT * FROM Db;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: #3d3d3d;"&gt;Always make sure that the syntax and path of the Include construct are correct. Or your variable will not be loaded and the CONNECT statement will fail.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: #3d3d3d;"&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'courier new', courier; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Peter&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 21:39:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043079#M920845</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-04-28T21:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043080#M920846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you the quick reply. Can we use Let instead of set in this scenario ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 21:49:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043080#M920846</guid>
      <dc:creator>h_prakash</dc:creator>
      <dc:date>2016-04-28T21:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043081#M920847</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you can. Although the SET statement is more flexible when trying to stuff a string with pesky characters (quotes, double quotes, brackets) in a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 21:59:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043081#M920847</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2016-04-28T21:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043082#M920848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the Help Peter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 22:01:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043082#M920848</guid>
      <dc:creator>h_prakash</dc:creator>
      <dc:date>2016-04-28T22:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Help</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043083#M920849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) First of all variable vtest is not necessary as Peter mentioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) You cant use $(vtest).&amp;nbsp;&amp;nbsp; You have to assign to another variable using let or set&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eg: Let vtest2 = $(vtest);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Uva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2016 22:19:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-Help/m-p/1043083#M920849</guid>
      <dc:creator />
      <dc:date>2016-04-28T22:19:18Z</dc:date>
    </item>
  </channel>
</rss>

