<?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 Data Loop Query (Adding new field to table) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Data-Loop-Query-Adding-new-field-to-table/m-p/1724477#M63946</link>
    <description>&lt;P&gt;To Whom it May Concern,&lt;/P&gt;&lt;P&gt;I hope this finds you well and in good health. I am currently using the below script to load data. A new file is created every quarter with the&amp;nbsp; same file-name/fields which allows this data load loop to function.&lt;/P&gt;&lt;P&gt;My question is, if I decide to add a new field to the file this quarter (lets say date of birth) and added that field to the script below ... do I have to manually add that field to all past files or is there a function that will allow for this load loop to function where additional fields in new files are not present in the older ones.&lt;/P&gt;&lt;P&gt;Thank you in advance for your support &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SCRIPT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;set vconcatenate=';';&lt;/P&gt;&lt;P&gt;for each file in filelist('lib://RANDOM (SERVER-qlik-01_qliksupport)//Q*.xlsx')&lt;/P&gt;&lt;P&gt;$(vconcatenate)&lt;/P&gt;&lt;P&gt;[TABLE]:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;"FIELD1",&lt;BR /&gt;"FIELD2",&lt;BR /&gt;Date#(mid(FileBaseName(),1,7),'QQ/YYYY') as Date,&lt;BR /&gt;' [$(file)]' as filename&lt;/P&gt;&lt;P&gt;from [$(file)]&lt;BR /&gt;(ooxml, embedded labels, table is [TRAINEES]);&lt;/P&gt;&lt;P&gt;set vconcatenate='concatenate';&lt;/P&gt;&lt;P&gt;next file&lt;/P&gt;&lt;P&gt;STORE TABLE INTO [lib://RANDOM (SERVER-qlik-01_qliksupport)//StorageSocial.qvd];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Mohammed&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 18:25:05 GMT</pubDate>
    <dc:creator>malradi88</dc:creator>
    <dc:date>2024-11-16T18:25:05Z</dc:date>
    <item>
      <title>Data Loop Query (Adding new field to table)</title>
      <link>https://community.qlik.com/t5/App-Development/Data-Loop-Query-Adding-new-field-to-table/m-p/1724477#M63946</link>
      <description>&lt;P&gt;To Whom it May Concern,&lt;/P&gt;&lt;P&gt;I hope this finds you well and in good health. I am currently using the below script to load data. A new file is created every quarter with the&amp;nbsp; same file-name/fields which allows this data load loop to function.&lt;/P&gt;&lt;P&gt;My question is, if I decide to add a new field to the file this quarter (lets say date of birth) and added that field to the script below ... do I have to manually add that field to all past files or is there a function that will allow for this load loop to function where additional fields in new files are not present in the older ones.&lt;/P&gt;&lt;P&gt;Thank you in advance for your support &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SCRIPT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;set vconcatenate=';';&lt;/P&gt;&lt;P&gt;for each file in filelist('lib://RANDOM (SERVER-qlik-01_qliksupport)//Q*.xlsx')&lt;/P&gt;&lt;P&gt;$(vconcatenate)&lt;/P&gt;&lt;P&gt;[TABLE]:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;"FIELD1",&lt;BR /&gt;"FIELD2",&lt;BR /&gt;Date#(mid(FileBaseName(),1,7),'QQ/YYYY') as Date,&lt;BR /&gt;' [$(file)]' as filename&lt;/P&gt;&lt;P&gt;from [$(file)]&lt;BR /&gt;(ooxml, embedded labels, table is [TRAINEES]);&lt;/P&gt;&lt;P&gt;set vconcatenate='concatenate';&lt;/P&gt;&lt;P&gt;next file&lt;/P&gt;&lt;P&gt;STORE TABLE INTO [lib://RANDOM (SERVER-qlik-01_qliksupport)//StorageSocial.qvd];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Mohammed&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:25:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-Loop-Query-Adding-new-field-to-table/m-p/1724477#M63946</guid>
      <dc:creator>malradi88</dc:creator>
      <dc:date>2024-11-16T18:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Data Loop Query (Adding new field to table)</title>
      <link>https://community.qlik.com/t5/App-Development/Data-Loop-Query-Adding-new-field-to-table/m-p/1725569#M63947</link>
      <description>&lt;P&gt;You are using CONCATENATE here. It will take care of this issue.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2020 03:16:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-Loop-Query-Adding-new-field-to-table/m-p/1725569#M63947</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2020-07-07T03:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Data Loop Query (Adding new field to table)</title>
      <link>https://community.qlik.com/t5/App-Development/Data-Loop-Query-Adding-new-field-to-table/m-p/1726172#M63948</link>
      <description>&lt;P&gt;Thank you! Yes the problem was I didn't do an initial wild card load before the transformations so it was giving me an error whenever I added a field.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Mohammed&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 15:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Data-Loop-Query-Adding-new-field-to-table/m-p/1726172#M63948</guid>
      <dc:creator>malradi88</dc:creator>
      <dc:date>2020-07-08T15:37:24Z</dc:date>
    </item>
  </channel>
</rss>

