<?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 Creating QVD Looping Problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-QVD-Looping-Problem/m-p/157271#M32817</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Canadian&lt;/P&gt;&lt;P&gt;A variable declared as Directory[1] is not an array with the first (or second?) element 1 but a variable called "Directory[1]".&lt;/P&gt;&lt;P&gt;You can see this looking at the variables in Settings/Variable Overview after your load attempt.&lt;/P&gt;&lt;P&gt;So "Directory(1)" will return null as it is unknown syntax. Unfortunately the Load scripts bear many traps.&lt;/P&gt;&lt;P&gt;I suggest you set a variable within the loop that contains your expected file name, then simply use that variable in the store command.&lt;/P&gt;&lt;P&gt;You can also single step through your script and will see with each step the variables content.&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;Juerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 May 2010 18:21:18 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-19T18:21:18Z</dc:date>
    <item>
      <title>Creating QVD Looping Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-QVD-Looping-Problem/m-p/157270#M32816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey if someone could please help me with this code bit that is simply not working&lt;/P&gt;&lt;P&gt;MY goal is to loop through each list projects (ie in the variable ProjectName&lt;I&gt;) and store them a specific file. So right now I only have one. So my goal in this case is to load from SP2 Project Sample.xml and then take the table Field_Table and store it in c:\LANDESK\TEST\CurrentDateField_Table.qvd . Below it is storing it in c:\ so any help is appreciated&lt;/I&gt;&lt;/P&gt;&lt;P&gt;thanks, Jason&lt;/P&gt;&lt;P&gt;The Code:&lt;/P&gt;&lt;P&gt;SET Directory[1] = c:\;&lt;BR /&gt;SET ProjectName[1] = SP2 Project Sample.xml;&lt;BR /&gt;SET ProjectPath[1]=LANDESK\TEST;&lt;BR /&gt;LET ProjectCount=1;&lt;BR /&gt;LET CurrentDate = date(today(),'YYMMDD');&lt;/P&gt;&lt;P&gt;for a = 1 to ProjectCount&lt;BR /&gt; //LOAD all tables in to QVDs based on a filename convention of FileName and Current Date&lt;BR /&gt; Field_Table:&lt;BR /&gt; LOAD&lt;BR /&gt; $(CurrentDate) as Field_Table.CurrentDate,&lt;BR /&gt; FieldID,&lt;BR /&gt; FieldName,&lt;BR /&gt; Alias,&lt;BR /&gt; Guid&lt;BR /&gt; FROM [$(Directory$(1))$(ProjectPath(1))\$(ProjectName$(1))](XmlSimple, Table is [Project/ExtendedAttributes/ExtendedAttribute]);&lt;BR /&gt; SET FileName = $(CurrentDate)Field_Table.qvd;&lt;BR /&gt; STORE Field_Table INTO [$(Directory(1))$(ProjectPath(1))\$(FileName)];&lt;BR /&gt; DROP TABLE Field_Table;&lt;BR /&gt;next a&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 May 2010 18:03:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-QVD-Looping-Problem/m-p/157270#M32816</guid>
      <dc:creator />
      <dc:date>2010-05-19T18:03:29Z</dc:date>
    </item>
    <item>
      <title>Creating QVD Looping Problem</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-QVD-Looping-Problem/m-p/157271#M32817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Canadian&lt;/P&gt;&lt;P&gt;A variable declared as Directory[1] is not an array with the first (or second?) element 1 but a variable called "Directory[1]".&lt;/P&gt;&lt;P&gt;You can see this looking at the variables in Settings/Variable Overview after your load attempt.&lt;/P&gt;&lt;P&gt;So "Directory(1)" will return null as it is unknown syntax. Unfortunately the Load scripts bear many traps.&lt;/P&gt;&lt;P&gt;I suggest you set a variable within the loop that contains your expected file name, then simply use that variable in the store command.&lt;/P&gt;&lt;P&gt;You can also single step through your script and will see with each step the variables content.&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;Juerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 May 2010 18:21:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-QVD-Looping-Problem/m-p/157271#M32817</guid>
      <dc:creator />
      <dc:date>2010-05-19T18:21:18Z</dc:date>
    </item>
  </channel>
</rss>

