<?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: Load a variable file name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481496#M1226099</link>
    <description>&lt;P&gt;Hmm...&lt;/P&gt;
&lt;P&gt;Can you share the error you're getting?&lt;/P&gt;
&lt;P&gt;And what is the output of&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;trace $(vFile);&lt;/FONT&gt; ?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Sep 2024 11:34:08 GMT</pubDate>
    <dc:creator>madelonjansen</dc:creator>
    <dc:date>2024-09-13T11:34:08Z</dc:date>
    <item>
      <title>Load a variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481480#M1226096</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying (in vain) to get a dynamic file name loaded.&lt;/P&gt;
&lt;P&gt;The file is located at&amp;nbsp;&lt;/P&gt;
&lt;P&gt;C:\Temp\SEPA\Pending Upload&lt;/P&gt;
&lt;P&gt;I have a variable vFolder C:\Temp\SEPA&lt;/P&gt;
&lt;P&gt;Mu script which worked until we moved servers...&lt;/P&gt;
&lt;DIV&gt;For Each vFolder in DirList('Pending Upload*')&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;FOLDER:&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Load&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; '$(vFolder)' As Folder&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Autogenerate(1);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; For Each vFile in FileList('$(vFolder)\*.xml')&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;FILE:&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Load&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; '$(vFile)' As File&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Autogenerate(1);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; trace $(vFile);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; Templates:&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; First 1&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;PmtInf:&lt;/DIV&gt;
&lt;DIV&gt;LOAD PmtInfId,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; PmtMtd,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; NbOfTxs,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; CtrlSum,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; ReqdExctnDt,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; PmtInfId &amp;amp; CtrlSum as JNL_KEY,&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [CdtTrfTxInf/CdtrAcct/Id/IBAN] as [CdtrAcct/Id/IBAN],&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [CdtTrfTxInf/Cdtr/Nm] as [Cdtr/Nm],&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [CdtTrfTxInf/Amt/InstdAmt] as InstdAmt,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [CdtTrfTxInf/Amt/InstdAmt/Ccy] as Ccy,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [CdtTrfTxInf/PmtId/EndToEndId] as EndToEndId,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [DbtrAgt/FinInstnId/Othr/Id] as [FinInstnId/Othr/Id],&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [DbtrAcct/Id/IBAN],&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; [Dbtr/Nm],&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; %Key_Document_5537B40932C780D8,&amp;nbsp; &amp;nbsp; // Key to parent table: Document&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; '$(vFile)' as Key&lt;/DIV&gt;
&lt;DIV&gt;FROM $(vFile) (XmlSimple, Table is [Document/CstmrCdtTrfInitn/PmtInf]);&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The load appears to do nothing.so obviously I have something wrong. Any thoughts or suggestions would be appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rob&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 09:50:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481480#M1226096</guid>
      <dc:creator>racer25</dc:creator>
      <dc:date>2024-09-13T09:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Load a variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481490#M1226097</link>
      <description>&lt;P&gt;Hi &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Try it with square brackets around your vFile:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;FROM &lt;STRONG&gt;[&lt;/STRONG&gt;$(vFile)&lt;STRONG&gt;]&lt;/STRONG&gt; (XmlSim....&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 10:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481490#M1226097</guid>
      <dc:creator>madelonjansen</dc:creator>
      <dc:date>2024-09-13T10:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Load a variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481494#M1226098</link>
      <description>&lt;P&gt;Tried that and no joy. but thanks for taking a look&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 11:18:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481494#M1226098</guid>
      <dc:creator>racer25</dc:creator>
      <dc:date>2024-09-13T11:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Load a variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481496#M1226099</link>
      <description>&lt;P&gt;Hmm...&lt;/P&gt;
&lt;P&gt;Can you share the error you're getting?&lt;/P&gt;
&lt;P&gt;And what is the output of&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;trace $(vFile);&lt;/FONT&gt; ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 11:34:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481496#M1226099</guid>
      <dc:creator>madelonjansen</dc:creator>
      <dc:date>2024-09-13T11:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load a variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481511#M1226100</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6547"&gt;@racer25&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Can you please try this?&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;For Each vFolder in DirList('C:\Temp\SEPA\Pending Upload\*')&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 13:18:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481511#M1226100</guid>
      <dc:creator>marksouzacosta</dc:creator>
      <dc:date>2024-09-13T13:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: Load a variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481532#M1226101</link>
      <description>&lt;P&gt;Thanks for the replies&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No joy on amending the file path to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;For Each vFolder in DirList('C:\Temp\SEPA\Pending Upload\*')&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I "Step" through the script it gets to that line and immediately goes to the end without error..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 14:23:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481532#M1226101</guid>
      <dc:creator>racer25</dc:creator>
      <dc:date>2024-09-13T14:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load a variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481534#M1226102</link>
      <description>&lt;P&gt;Hmmm. You can try this:&lt;/P&gt;
&lt;P&gt;In the very same QlikView App, temporarily load one of those XML files using Qlik Wizard and see the file path that QlikView is using and compare against the folder you are using in your DirList. We are probably missing something there.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 14:29:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481534#M1226102</guid>
      <dc:creator>marksouzacosta</dc:creator>
      <dc:date>2024-09-13T14:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Load a variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481540#M1226103</link>
      <description>&lt;P&gt;Just a thought as I read another post am I over complicating things. There will only ever be one file in that folder and I was looking at this option&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/Load-multiple-files/td-p/87076" target="_blank"&gt;Solved: Load multiple files - Qlik Community - 87076&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;My XML load gave me this which does suggest we have the file path right.&lt;/P&gt;
&lt;P&gt;// Start of [PAIN001AON20240827092220.xml] LOAD statements&lt;BR /&gt;PmtInf:&lt;BR /&gt;LOAD PmtInfId,&lt;BR /&gt;PmtMtd,&lt;BR /&gt;NbOfTxs as [PmtInf/NbOfTxs],&lt;BR /&gt;CtrlSum as [PmtInf/CtrlSum],&lt;BR /&gt;ReqdExctnDt,&lt;BR /&gt;[CdtTrfTxInf/CdtrAcct/Id/IBAN] as [CdtrAcct/Id/IBAN],&lt;BR /&gt;[CdtTrfTxInf/Cdtr/Nm] as [Cdtr/Nm],&lt;BR /&gt;[CdtTrfTxInf/Amt/InstdAmt] as InstdAmt,&lt;BR /&gt;[CdtTrfTxInf/Amt/InstdAmt/Ccy] as Ccy,&lt;BR /&gt;[CdtTrfTxInf/PmtId/EndToEndId] as EndToEndId,&lt;BR /&gt;[DbtrAgt/FinInstnId/Othr/Id] as [FinInstnId/Othr/Id],&lt;BR /&gt;[DbtrAcct/Id/IBAN],&lt;BR /&gt;[Dbtr/Nm],&lt;BR /&gt;%Key_Document_5537B40932C780D8 // Key to parent table: Document&lt;BR /&gt;FROM [C:\Temp\SEPA\Pending Upload\PAIN001AON20240827092220.xml] (XmlSimple, Table is [Document/CstmrCdtTrfInitn/PmtInf]);&lt;/P&gt;
&lt;P&gt;Document:&lt;BR /&gt;LOAD [CstmrCdtTrfInitn/GrpHdr/MsgId] as MsgId,&lt;BR /&gt;[CstmrCdtTrfInitn/GrpHdr/CreDtTm] as CreDtTm,&lt;BR /&gt;[CstmrCdtTrfInitn/GrpHdr/NbOfTxs] as [GrpHdr/NbOfTxs],&lt;BR /&gt;[CstmrCdtTrfInitn/GrpHdr/CtrlSum] as [GrpHdr/CtrlSum],&lt;BR /&gt;[CstmrCdtTrfInitn/GrpHdr/InitgPty/Id/PrvtId/Othr/Id] as [PrvtId/Othr/Id],&lt;BR /&gt;%Key_Document_5537B40932C780D8 // Key for this table: Document&lt;BR /&gt;FROM [C:\Temp\SEPA\Pending Upload\PAIN001AON20240827092220.xml] (XmlSimple, Table is [Document]);&lt;BR /&gt;// End of [PAIN001AON20240827092220.xml] LOAD statements&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 14:38:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481540#M1226103</guid>
      <dc:creator>racer25</dc:creator>
      <dc:date>2024-09-13T14:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Load a variable file name</title>
      <link>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481567#M1226104</link>
      <description>&lt;P&gt;I see. Yes, if that is the case, you don't need the DirList and the other things.&lt;/P&gt;
&lt;P&gt;Regardless that, to make your code work with the DirList I guess you need this:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;For Each vFolder in DirList('C:\Temp\SEPA\*')&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;So, this should find the&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;Pending Upload&lt;/STRONG&gt; directory&lt;/SPAN&gt;&amp;nbsp;that will have the XML file in it.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 17:03:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-a-variable-file-name/m-p/2481567#M1226104</guid>
      <dc:creator>marksouzacosta</dc:creator>
      <dc:date>2024-09-13T17:03:42Z</dc:date>
    </item>
  </channel>
</rss>

