<?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 Conditional load of fields from different QVD files. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673156#M244438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a scenario where I have multiple QVD files.&lt;/P&gt;&lt;P&gt;Say file_Oct_2013, file_Nov_2013 and file_Dec_2014 (..and so on). Each file has exactly same fields. Let us say four fields in each files are field_A, field_B, field_C and field_D. [&lt;STRONG&gt;&lt;EM&gt;Let us consider field_A is DATE field&lt;/EM&gt;&lt;/STRONG&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But files from Jan 2014 onwards (say file_Jan_2014, file_Feb_2014...), have an additional field called field_E, which was not present in earlier files.&lt;/P&gt;&lt;P&gt;Now I have a code that uses a FOR LOOP to go to the qvd location and loads every file using wild-card match:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each File_Name in filelist('$(v_Qvd_DirPath)\file_*.qvd')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the new QVD files have an additional fields hence the above code throws an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, is there anyway of resolving this problem using any QV inbuilt function? (For example: FieldNumber().... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; but that's not going to work as I loading from QVDs and not from tables).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I have decided to split the LOAD on putting a where condition on field_A&amp;lt;= Date '12-31-2013' (which will cause my load script to be divided in two parts almost writing the same code again for field_A &amp;gt; Date '12-31-2013'...this works )...but I am looking for an optimal way of accomplishing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Aug 2014 08:52:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-29T08:52:52Z</dc:date>
    <item>
      <title>Conditional load of fields from different QVD files.</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673156#M244438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a scenario where I have multiple QVD files.&lt;/P&gt;&lt;P&gt;Say file_Oct_2013, file_Nov_2013 and file_Dec_2014 (..and so on). Each file has exactly same fields. Let us say four fields in each files are field_A, field_B, field_C and field_D. [&lt;STRONG&gt;&lt;EM&gt;Let us consider field_A is DATE field&lt;/EM&gt;&lt;/STRONG&gt;]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But files from Jan 2014 onwards (say file_Jan_2014, file_Feb_2014...), have an additional field called field_E, which was not present in earlier files.&lt;/P&gt;&lt;P&gt;Now I have a code that uses a FOR LOOP to go to the qvd location and loads every file using wild-card match:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each File_Name in filelist('$(v_Qvd_DirPath)\file_*.qvd')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since the new QVD files have an additional fields hence the above code throws an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, is there anyway of resolving this problem using any QV inbuilt function? (For example: FieldNumber().... &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; but that's not going to work as I loading from QVDs and not from tables).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I have decided to split the LOAD on putting a where condition on field_A&amp;lt;= Date '12-31-2013' (which will cause my load script to be divided in two parts almost writing the same code again for field_A &amp;gt; Date '12-31-2013'...this works )...but I am looking for an optimal way of accomplishing this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 08:52:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673156#M244438</guid>
      <dc:creator />
      <dc:date>2014-08-29T08:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load of fields from different QVD files.</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673157#M244439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure what you are trying to achieve. Equivalent to FieldNumber(), you can try:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;QvdNoOfFields&lt;/STRONG&gt; ('C:\MyDir\MyFile.qvd')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, may be you need &lt;STRONG&gt;concatenate&lt;/STRONG&gt; keyword to forcefully concatenate the tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 09:14:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673157#M244439</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-08-29T09:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load of fields from different QVD files.</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673158#M244440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you do go down the concatenate option, you will need to adjust the loop a bit so that the first cycle creates the table and all others then concatenate.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 09:55:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673158#M244440</guid>
      <dc:creator />
      <dc:date>2014-08-29T09:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load of fields from different QVD files.</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673159#M244441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;To keep it simple, let me explain my example (as the real-life code is too big to comprehend).&lt;/P&gt;&lt;P&gt;File_1.qvd has 3 data fields A, B, C&lt;/P&gt;&lt;P&gt;File_2.qvd has 4 data fields A, B, C, D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Available Info&lt;/STRONG&gt;: Field A is a date field. When A &amp;lt; 7/1/2014 [format: MM/DD/YYYY] the qvd has three fields else 4 fields. Both qvd files are in same location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to loop through the files when I "LOAD" data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, is it possible using a single FOR EACH to load data (Number of fields varies depending on the date field A)??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Aug 2014 16:28:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673159#M244441</guid>
      <dc:creator />
      <dc:date>2014-08-30T16:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load of fields from different QVD files.</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673160#M244442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your comments. I created if staments inside loop and once it finishes, I concatenate the files.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 09:12:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673160#M244442</guid>
      <dc:creator />
      <dc:date>2014-09-02T09:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional load of fields from different QVD files.</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673161#M244443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good stuff, glad to be of help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 10:52:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-load-of-fields-from-different-QVD-files/m-p/673161#M244443</guid>
      <dc:creator />
      <dc:date>2014-09-02T10:52:45Z</dc:date>
    </item>
  </channel>
</rss>

