<?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: Problem in script : Variable keep value in memory in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Problem-in-script-Variable-keep-value-in-memory/m-p/1511855#M36484</link>
    <description>&lt;P&gt;This doesn't look like a valid connection name.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;.....\Approvisionnement Logvad&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The .... is sure to confuse the script parser.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 25 Nov 2018 00:07:03 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2018-11-25T00:07:03Z</dc:date>
    <item>
      <title>Problem in script : Variable keep value in memory</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-in-script-Variable-keep-value-in-memory/m-p/1510591#M36441</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, I have a problem with the following script: &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;LET vFilePath ='lib://AttachedFiles';
FOR EACH file in FileList('$(vFilePath)/*.csv'); // Loops each excel file in the given Folder
LET vFileDate = Date(Left(right(file,28),8)); // Gets the year portion from the filename
LET vMaxDate = Rangemax(vFileDate, vMaxDate); // Gets the max year for every iteration
NEXT


Data:
LOAD *
FROM [$(vFilePath)/$(vMaxDate)-product-extract.csv]
(txt, utf8, embedded labels, delimiter is '|', msq);&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;The script works very well, that is, it will fetch me the last CSV file on my server. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;However, when I change the name of the path where I have to look for the CSV file, I have the following error:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Cannot open file: 'lib://AttachedFiles/20181028-product-extract.csv'&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;While the new folder contains exactly the same CSV. I feel that my vFilePath variable keeps track of the folder path.&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;How could I solve that?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 17:33:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-in-script-Variable-keep-value-in-memory/m-p/1510591#M36441</guid>
      <dc:creator>jmialoundama</dc:creator>
      <dc:date>2018-11-21T17:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in script : Variable keep value in memory</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-in-script-Variable-keep-value-in-memory/m-p/1510608#M36442</link>
      <description>&lt;P&gt;When you say "change the name of the path" do you mean you edit the folder in the connection named "AttachedFiles"? Or something else?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Wed, 21 Nov 2018 18:10:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-in-script-Variable-keep-value-in-memory/m-p/1510608#M36442</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2018-11-21T18:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in script : Variable keep value in memory</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-in-script-Variable-keep-value-in-memory/m-p/1510823#M36453</link>
      <description>Hello Rob,&lt;BR /&gt;&lt;BR /&gt;I have toi differents connexion:&lt;BR /&gt;- first connexion : lib://Attachements&lt;BR /&gt;- 2nd connexion : lib://.....\Approvisionnement Logvad&lt;BR /&gt;&lt;BR /&gt;My second connexion contains exactly same csv files.&lt;BR /&gt;When i change the name of path I have this error : «Cannot open file lib://Attachementd\20181118-product-extract.&lt;BR /&gt;&lt;BR /&gt;So, i think My variable vFilePath keep in memory the folder wich receive at first and when i Want to change the path it’s not works.</description>
      <pubDate>Thu, 22 Nov 2018 07:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-in-script-Variable-keep-value-in-memory/m-p/1510823#M36453</guid>
      <dc:creator>jmialoundama</dc:creator>
      <dc:date>2018-11-22T07:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem in script : Variable keep value in memory</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-in-script-Variable-keep-value-in-memory/m-p/1511855#M36484</link>
      <description>&lt;P&gt;This doesn't look like a valid connection name.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;.....\Approvisionnement Logvad&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The .... is sure to confuse the script parser.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Nov 2018 00:07:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-in-script-Variable-keep-value-in-memory/m-p/1511855#M36484</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2018-11-25T00:07:03Z</dc:date>
    </item>
  </channel>
</rss>

