<?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: Loop through fields in column to assign as a variable for file load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loop-through-fields-in-column-to-assign-as-a-variable-for-file/m-p/1337336#M412399</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try with Peek function to set the values Like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let vFile1=Peek(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;PeriodEnd,i,'TableName');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;then (try without single quote in the Loading table, otherwise put single quote(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&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;Load&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field 3&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; [\\ABC\Data\&lt;STRONG&gt;'$(vFile1)'&lt;/STRONG&gt;.qvd]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; (qvd);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Jun 2017 05:00:21 GMT</pubDate>
    <dc:creator>settu_periasamy</dc:creator>
    <dc:date>2017-06-22T05:00:21Z</dc:date>
    <item>
      <title>Loop through fields in column to assign as a variable for file load</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-through-fields-in-column-to-assign-as-a-variable-for-file/m-p/1337335#M412398</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;I have a list of dates that are used to identify the extensions of named files QVD.&lt;/P&gt;&lt;P&gt;I would like to look through the list, setting the value as a variable and then load that QVD data.&lt;/P&gt;&lt;P&gt;Then move to the next on the list and load the QVD.&amp;nbsp; Currently I have to hard code an extension every month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the below data, the variable remains as null. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Example of table with fields to set as variables&lt;/P&gt;&lt;P&gt;PeriodEnd //title of Field in table CalendarFields&lt;/P&gt;&lt;P&gt;1/2/2016&lt;/P&gt;&lt;P&gt;2/6/2016&lt;/P&gt;&lt;P&gt;3/5/2016&lt;/P&gt;&lt;P&gt;//etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let vNumRows =NoOfRows('CalendarFields');&lt;/P&gt;&lt;P&gt;//Loop to Load&lt;/P&gt;&lt;P&gt;For i = 0 to $(vNumRows)&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vFile1 = [PeriodEnd];&lt;/P&gt;&lt;P&gt;&amp;nbsp; Concatenate //Please note I have a table already started.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp; [\\ABC\Data\$(vFile1).qvd]&lt;/P&gt;&lt;P&gt;&amp;nbsp; (qvd);&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error I get is that the $(vFile1) never populates with a value because the vFile1 is always &amp;lt;null&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So need need &lt;SPAN style="font-size: 13.3333px;"&gt;$(vFile1) to = 1/2/2016&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;then &lt;SPAN style="font-size: 13.3333px;"&gt;$(vFile1) = 2/6/2016&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;then &lt;SPAN style="font-size: 13.3333px;"&gt;$(vFile1) = 3/5/2016....etc,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2017 19:02:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-through-fields-in-column-to-assign-as-a-variable-for-file/m-p/1337335#M412398</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-21T19:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through fields in column to assign as a variable for file load</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-through-fields-in-column-to-assign-as-a-variable-for-file/m-p/1337336#M412399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Try with Peek function to set the values Like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Let vFile1=Peek(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;PeriodEnd,i,'TableName');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;then (try without single quote in the Loading table, otherwise put single quote(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&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;Load&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field1,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field2,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Field 3&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; [\\ABC\Data\&lt;STRONG&gt;'$(vFile1)'&lt;/STRONG&gt;.qvd]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; (qvd);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 05:00:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-through-fields-in-column-to-assign-as-a-variable-for-file/m-p/1337336#M412399</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2017-06-22T05:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through fields in column to assign as a variable for file load</title>
      <link>https://community.qlik.com/t5/QlikView/Loop-through-fields-in-column-to-assign-as-a-variable-for-file/m-p/1337337#M412400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Settu&lt;/P&gt;&lt;P&gt;Here is the final syntax that worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For i = 0 to $(vNumRows)&lt;/P&gt;&lt;P&gt;let vsumbox = (i+1); //Row zero did not return a value.&lt;/P&gt;&lt;P&gt;Let vBox =&amp;nbsp; floor(date(FieldValue('PeriodEnd',$(vsumbox))));&amp;nbsp; //I Ioaded and uniquely titled the field PeriodEnd so no table required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; [\\ABC\Data\&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;$(vFile1)&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;.qvd] //No single quotes.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I'm currently on version 12.0.20400.00 64 bit&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;This will save so much time!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Jun 2017 19:33:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loop-through-fields-in-column-to-assign-as-a-variable-for-file/m-p/1337337#M412400</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-22T19:33:45Z</dc:date>
    </item>
  </channel>
</rss>

