<?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 For Each logic - loading multi-company QVD's in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229751#M81639</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;Thank you for your help, however at first look it's quite confusing.&lt;/P&gt;&lt;P&gt;For a starting point, is there something simpler I can look at?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 May 2010 01:40:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-03T01:40:19Z</dc:date>
    <item>
      <title>For Each logic - loading multi-company QVD's</title>
      <link>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229749#M81637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a situation where i have 5 company's with identical QVD files (i have simplified it down to one file)&lt;/P&gt;&lt;P&gt;These are stored in the structure&lt;/P&gt;&lt;P&gt;QVD\001\GLTrans.qvd&lt;/P&gt;&lt;P&gt;QVD\002\GLTrans.qvd&lt;/P&gt;&lt;P&gt;QVD\003\GLTrans.qvd&lt;/P&gt;&lt;P&gt;QVD\004\GLTrans.qvd&lt;/P&gt;&lt;P&gt;QVD\005\GLTrans.qvd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want to have to concatentate each QVD for each company. The company list may expand and I want to create something that is easily maintainable. I'd rather write a script that loaded GLTrans.qvd for every company.&lt;/P&gt;&lt;P&gt;The key is, i need to also create primary key's by inserting the Company code (XXX) into the loaded table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e.&lt;/P&gt;&lt;P&gt;FOR EACH CompanyCode&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;INSERT CompanyCode as GLCompanyCode,&lt;/P&gt;&lt;P&gt;CompanyCode &amp;amp; GLAccountCode as GLCompanyAccountCode,&lt;/P&gt;&lt;P&gt;GLAccountCode,&lt;/P&gt;&lt;P&gt;GLTranDate,&lt;/P&gt;&lt;P&gt;GLTranAmount&lt;/P&gt;&lt;P&gt;FROM CompanyCode\GLTrans.qvd&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously this is pseduo-code. I'm not sure how to write the real code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could anyone please assist?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 May 2010 00:52:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229749#M81637</guid>
      <dc:creator />
      <dc:date>2010-05-03T00:52:46Z</dc:date>
    </item>
    <item>
      <title>For Each logic - loading multi-company QVD's</title>
      <link>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229750#M81638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;check out my "QlikView Explorer" in "Share QlikViews":&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/media/p/16.aspx" target="_blank" title="http://community.qlik.com/media/p/16.aspx"&gt;http://community.qlik.com/media/p/16.aspx&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's a bit old (developed on ver. 7.52), so some macros might not work, but in the script you can find an example of how to recursively read the folder structure and gather information about folders, files, etc...A simplified version of that script would do what I are trying to do.&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV id="refHTML"&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 May 2010 01:02:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229750#M81638</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2010-05-03T01:02:06Z</dc:date>
    </item>
    <item>
      <title>For Each logic - loading multi-company QVD's</title>
      <link>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229751#M81639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oleg,&lt;/P&gt;&lt;P&gt;Thank you for your help, however at first look it's quite confusing.&lt;/P&gt;&lt;P&gt;For a starting point, is there something simpler I can look at?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 May 2010 01:40:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229751#M81639</guid>
      <dc:creator />
      <dc:date>2010-05-03T01:40:19Z</dc:date>
    </item>
    <item>
      <title>For Each logic - loading multi-company QVD's</title>
      <link>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229752#M81640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;You can use the FOR EACH dirlist() syntax to process the company directories below the QVD node. Something like:&lt;/P&gt;&lt;P&gt;Directory QVD;&lt;BR /&gt;FOR EACH vDir IN dirlist('*')&lt;BR /&gt; LET vCompanyCode = subfield('$(vDir)', '\', -1);&lt;BR /&gt; GlTrans:&lt;BR /&gt; LOAD&lt;BR /&gt; '$(vCompanyCode)' as CompanyCode,&lt;BR /&gt; '$(vCompanyCode)' &amp;amp; GLAccountCode as GLCompanyAccountCode,&lt;BR /&gt; GLAccountCode,&lt;BR /&gt; GLTranDate,&lt;BR /&gt; GLTranAmount&lt;BR /&gt; FROM $(vDir)\GlTrans.qvd (qvd)&lt;BR /&gt; ;&lt;BR /&gt;NEXT vDir&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 May 2010 06:03:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229752#M81640</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-05-03T06:03:27Z</dc:date>
    </item>
    <item>
      <title>For Each logic - loading multi-company QVD's</title>
      <link>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229753#M81641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Absolutely fantastic!&lt;/P&gt;&lt;P&gt;Thanks very much Rob.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 May 2010 07:16:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/For-Each-logic-loading-multi-company-QVD-s/m-p/229753#M81641</guid>
      <dc:creator />
      <dc:date>2010-05-03T07:16:21Z</dc:date>
    </item>
  </channel>
</rss>

