<?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 Fill column based on folder name when data reload in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Fill-column-based-on-folder-name-when-data-reload/m-p/1284062#M856718</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have excel sheets belongs to each year (2015,2016,2017). those sheets are stored based on year. so i have three folders.&lt;/P&gt;&lt;P&gt;These sheets doesn't have year .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to add coulm to qlikview when reloading based on year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simply i want to implement for loop kind of thing to get data from all the folders and fill the year based on year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>anuradhaa</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Fill column based on folder name when data reload</title>
      <link>https://community.qlik.com/t5/QlikView/Fill-column-based-on-folder-name-when-data-reload/m-p/1284062#M856718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have excel sheets belongs to each year (2015,2016,2017). those sheets are stored based on year. so i have three folders.&lt;/P&gt;&lt;P&gt;These sheets doesn't have year .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to add coulm to qlikview when reloading based on year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simply i want to implement for loop kind of thing to get data from all the folders and fill the year based on year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this possible&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/Fill-column-based-on-folder-name-when-data-reload/m-p/1284062#M856718</guid>
      <dc:creator>anuradhaa</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Fill column based on folder name when data reload</title>
      <link>https://community.qlik.com/t5/QlikView/Fill-column-based-on-folder-name-when-data-reload/m-p/1284063#M856720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can find a script to loop through folders here: &lt;A href="https://community.qlik.com/thread/62449"&gt;loop through to load all files from a folder and its subfolders?&lt;/A&gt; It contains this part:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;for each SubDirectory in dirlist( Root &amp;amp; '\*' )&lt;/STRONG&gt;&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;&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; call ScanFolder(SubDirectory)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;next SubDirectory&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;You can use the variable Subdirectory to create the extra year column. Something like this:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&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;&amp;nbsp; *,&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; '$(SubDirectory)' as Year&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;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;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2017 17:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fill-column-based-on-folder-name-when-data-reload/m-p/1284063#M856720</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-02-02T17:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Fill column based on folder name when data reload</title>
      <link>https://community.qlik.com/t5/QlikView/Fill-column-based-on-folder-name-when-data-reload/m-p/1284064#M856722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still i have some issues,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it says&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cannot open file 'C:\Users\Dell\Desktop\Tech Stats\Report By Member*.csv' The system cannot find the file specified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the script i use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub ScanFolder(Data\Years)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for each SubDirectory in dirlist( Data\Years &amp;amp; '\*' )&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; call ScanFolder(SubDirectory)&lt;/P&gt;&lt;P&gt;[EH_temp]:&lt;/P&gt;&lt;P&gt;LOAD @1 as&amp;nbsp; [Member],&lt;/P&gt;&lt;P&gt;'$(SubDirectory)' as Year,&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Report By Member*.csv]&lt;/P&gt;&lt;P&gt;(txt, utf8, no labels, delimiter is ',', msq) where @1 &amp;lt;&amp;gt; 'Grand total' and @1 &amp;lt;&amp;gt; 'Report By Member' ;&lt;/P&gt;&lt;P&gt;next SubDirectory&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2017 03:22:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fill-column-based-on-folder-name-when-data-reload/m-p/1284064#M856722</guid>
      <dc:creator>anuradhaa</dc:creator>
      <dc:date>2017-02-03T03:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Fill column based on folder name when data reload</title>
      <link>https://community.qlik.com/t5/QlikView/Fill-column-based-on-folder-name-when-data-reload/m-p/1284065#M856724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I have files in below folder structure&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Main folder : C:\Users\Dell\Desktop\Stats\Data\Years&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;subfolders : 2016 , 2017 , 2015&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;each folder has n number of files : member****.csv&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;My qvw file is in the location C:\Users\Dell\Desktop\Stats&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I want to load all the files and get new feild call year based on subfolder name when reloading data&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;i used below script, but it doesn't work.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;what's trhe wrong with this script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;for each SubDirectory in dirlist(C:\Users\Dell\Desktop\Stats\Data\Years &amp;amp; '\*' )&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; call ScanFolder(C:\Users\Dell\Desktop\Stats\Data\Years)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;next SubDirectory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[EH_temp]:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD @1 as&amp;nbsp; [Report By Member],&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;@2 as PT,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;'$(SubDirectory)' as tempYear,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if(len(trim(TextBetween(@2, '#', ' ')))=0,trim(TextBetween(@2, '#', '')),trim(TextBetween(@2, '#', ' '))) as tId,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;trim(TextBetween(@2, '@', ' ')) as productname,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;@3 as Date,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;@4 as&amp;nbsp; Hours&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;[$(SubDirectory)\Report By Member*.csv]&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(txt, utf8, no labels, delimiter is ',', msq) where @1 &amp;lt;&amp;gt; 'Grand total' and @1 &amp;lt;&amp;gt; 'Report By Member' ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2017 05:38:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Fill-column-based-on-folder-name-when-data-reload/m-p/1284065#M856724</guid>
      <dc:creator>anuradhaa</dc:creator>
      <dc:date>2017-02-03T05:38:59Z</dc:date>
    </item>
  </channel>
</rss>

