<?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: Forced concatenation of multiple files in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764675#M59124</link>
    <description>&lt;P&gt;use force concatenate&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;Load 'dummy' as id;&lt;/P&gt;&lt;P&gt;For each vFile in FileList('lib://$(vConnexionFichiersDAP)/DSN/Suivi Anomali/Suivi/*.csv')&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;subfield(Filename(),'_',1) as IP,&lt;BR /&gt;replace(replace(replace(replace(subfield(Filename(),'_',2),'acpte','Accompte'),&lt;BR /&gt;'adh','Adhésion'),&lt;BR /&gt;'affil','Affiliation'),&lt;BR /&gt;'rglt','Réglement')&lt;BR /&gt;as Activité&lt;/P&gt;&lt;P&gt;From [$(vFile)] (txt, codepage is 28591, embedded labels, delimiter is ';', msq);&lt;BR /&gt;Next vFile;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you can remove the 1st dummy line from your table;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
    <pubDate>Thu, 26 Nov 2020 11:20:44 GMT</pubDate>
    <dc:creator>PrashantSangle</dc:creator>
    <dc:date>2020-11-26T11:20:44Z</dc:date>
    <item>
      <title>Forced concatenation of multiple files</title>
      <link>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764392#M59108</link>
      <description>&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;I need your help to add some calculated fields to my files, before concatenating all of my 8 files.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thanhng34_0-1606311064828.png" style="width: 554px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/44816i1449D0B9E2A98CB8/image-dimensions/554x219?v=v2" width="554" height="219" role="button" title="thanhng34_0-1606311064828.png" alt="thanhng34_0-1606311064828.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I would like to :&lt;/P&gt;&lt;P&gt;- Add an "IP" field in all the files:&lt;BR /&gt;IP = 'CAPI "if the name of the file starting with' capi ';&lt;BR /&gt;IP = 'CPCEA' if the name of the file starting with 'cpcea'.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- Add an "Activity" field in all files:&lt;BR /&gt;Activity = 'adhesion' if the file name contains 'adh'&lt;BR /&gt;Activity = 'affiliation' if the file name contains 'affil'&lt;BR /&gt;Activity = 'accompte' if the name of the file contains 'acpte'&lt;BR /&gt;Activity = 'reglement' if the name of the file contains 'rglt'&lt;/P&gt;&lt;P&gt;- Concatenate all these 8 files.&lt;/P&gt;&lt;P&gt;How can I do it in script?&lt;/P&gt;&lt;P&gt;Thanks so much in advance for your help.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 17:46:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764392#M59108</guid>
      <dc:creator>thanhng34</dc:creator>
      <dc:date>2024-11-16T17:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Add a field with conditions in file name on multiple files</title>
      <link>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764485#M59112</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add this in your script :&amp;nbsp;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;subfield(Filename(),'_',1) as IP,&lt;BR /&gt;replace(replace(replace(replace(subfield(Filename(),'_',2),'acpte','Accompte'),&lt;BR /&gt;'adh','Adhésion'),&lt;BR /&gt;'affil','Affiliation'),&lt;BR /&gt;'rglt','Réglement')&lt;BR /&gt;as Activity,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;from etc&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Et çà devrait marcher &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 17:57:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764485#M59112</guid>
      <dc:creator>brunobertels</dc:creator>
      <dc:date>2020-11-25T17:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add a field with conditions in file name on multiple files</title>
      <link>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764611#M59120</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your solution. I tried adding this to my script but it did'nt work (so many "$Syn"), while&amp;nbsp;the concatenation of one by one file (by "CONCATENATE" function) worked .&lt;/P&gt;&lt;P&gt;Here is my script :&lt;/P&gt;&lt;P&gt;For each vFile in FileList('lib://$(vConnexionFichiersDAP)/DSN/Suivi Anomali/Suivi/*.csv')&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;subfield(Filename(),'_',1) as IP,&lt;BR /&gt;replace(replace(replace(replace(subfield(Filename(),'_',2),'acpte','Accompte'),&lt;BR /&gt;'adh','Adhésion'),&lt;BR /&gt;'affil','Affiliation'),&lt;BR /&gt;'rglt','Réglement')&lt;BR /&gt;as Activité&lt;/P&gt;&lt;P&gt;From [$(vFile)] (txt, codepage is 28591, embedded labels, delimiter is ';', msq);&lt;BR /&gt;Next vFile&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="thanhng34_0-1606381808226.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/44857i0DE066756C932DA7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="thanhng34_0-1606381808226.png" alt="thanhng34_0-1606381808226.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Maybe I made a mistake in my script ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 09:13:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764611#M59120</guid>
      <dc:creator>thanhng34</dc:creator>
      <dc:date>2020-11-26T09:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Add a field with conditions in file name on multiple files</title>
      <link>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764651#M59121</link>
      <description>&lt;P&gt;I think It didn't work because my files do not have exactly the same set of fields (they have some common fields, but also different ones), so I have to make a forced concatenation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't know how to correct my script as I have a lot of files, and I don't want to repeat the CONCATENATE functions...&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 10:31:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764651#M59121</guid>
      <dc:creator>thanhng34</dc:creator>
      <dc:date>2020-11-26T10:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add a field with conditions in file name on multiple files</title>
      <link>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764665#M59122</link>
      <description>&lt;P&gt;for adding field IP use filename()&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like Load *, if(wildmatch(filename(),'capi*','CAPI','CPCEA') as IP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for activity field() also use combination of wildmatch() and filename()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;like&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(wildmatch(filename(),'*adh*'),'&lt;SPAN&gt;adhesion&lt;/SPAN&gt;'),if(wildmatch(filename(),'*&lt;SPAN&gt;affil&lt;/SPAN&gt;*'),'&lt;SPAN&gt;affiliation&lt;/SPAN&gt;'))) as activity&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 10:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764665#M59122</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2020-11-26T10:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Add a field with conditions in file name on multiple files</title>
      <link>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764668#M59123</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/42758"&gt;@PrashantSangle&lt;/a&gt; and &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48554"&gt;@brunobertels&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your solution. I managed to create the fields 'IP' and 'Activity" with your suggestions, but the problem is that I don't know how to concatenate my 8 files which do not have the same set of fields. I want to make a forced concatenation.&lt;/P&gt;&lt;P&gt;Here is my script :&lt;/P&gt;&lt;P&gt;For each vFile in FileList('lib://$(vConnexionFichiersDAP)/DSN/Suivi Anomali/Suivi/*.csv')&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;subfield(Filename(),'_',1) as IP,&lt;BR /&gt;replace(replace(replace(replace(subfield(Filename(),'_',2),'acpte','Accompte'),&lt;BR /&gt;'adh','Adhésion'),&lt;BR /&gt;'affil','Affiliation'),&lt;BR /&gt;'rglt','Réglement')&lt;BR /&gt;as Activité&lt;/P&gt;&lt;P&gt;From [$(vFile)] (txt, codepage is 28591, embedded labels, delimiter is ';', msq);&lt;BR /&gt;Next vFile&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 11:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764668#M59123</guid>
      <dc:creator>thanhng34</dc:creator>
      <dc:date>2020-11-26T11:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Forced concatenation of multiple files</title>
      <link>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764675#M59124</link>
      <description>&lt;P&gt;use force concatenate&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt;Load 'dummy' as id;&lt;/P&gt;&lt;P&gt;For each vFile in FileList('lib://$(vConnexionFichiersDAP)/DSN/Suivi Anomali/Suivi/*.csv')&lt;/P&gt;&lt;P&gt;concatenate&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;*,&lt;BR /&gt;subfield(Filename(),'_',1) as IP,&lt;BR /&gt;replace(replace(replace(replace(subfield(Filename(),'_',2),'acpte','Accompte'),&lt;BR /&gt;'adh','Adhésion'),&lt;BR /&gt;'affil','Affiliation'),&lt;BR /&gt;'rglt','Réglement')&lt;BR /&gt;as Activité&lt;/P&gt;&lt;P&gt;From [$(vFile)] (txt, codepage is 28591, embedded labels, delimiter is ';', msq);&lt;BR /&gt;Next vFile;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then you can remove the 1st dummy line from your table;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Prashant Sangle&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 11:20:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764675#M59124</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2020-11-26T11:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: Forced concatenation of multiple files</title>
      <link>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764683#M59125</link>
      <description>&lt;P&gt;Yes finally it worked ! Thanks so much for your help.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Thanh&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 11:43:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Forced-concatenation-of-multiple-files/m-p/1764683#M59125</guid>
      <dc:creator>thanhng34</dc:creator>
      <dc:date>2020-11-26T11:43:08Z</dc:date>
    </item>
  </channel>
</rss>

