<?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: BINARY load with dynamic file name in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/1824631#M1213863</link>
    <description>&lt;P&gt;Cold&amp;nbsp; you please share your Qlick files&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jul 2021 22:49:07 GMT</pubDate>
    <dc:creator>chetanpatel</dc:creator>
    <dc:date>2021-07-26T22:49:07Z</dc:date>
    <item>
      <title>BINARY load with dynamic file name</title>
      <link>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859053#M655515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an environment where a UX.QVW needs to import the data structure from a Data.QVW using a binary load. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That would be very easy if the QlikMart file always had the same name - but it doesn't. The reasons are a little harder to explain, but for the purpose of simplicity, let's assume it's just a Y&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;earMonth suffix, for example Data_201505.QVW.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get the BIINARY LOAD code right. I cannot use any other script sentences before to calculate the filename, so I expect dollar sign to be the solution, but cannot get it right. Something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BINARY QM_$(=year(today()*100+month(today())).qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... just does not work... it seems that the dollar sign with equal sign is not properly evaluated. It does work in an expression in a text box for example, but when debugging it in the load script, the $(=...) just evaluates to empty string or worse to '(internal error)'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There might already be a solution in the community but I cannot find it...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 17:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859053#M655515</guid>
      <dc:creator>jcamps</dc:creator>
      <dc:date>2015-06-09T17:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: BINARY load with dynamic file name</title>
      <link>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859054#M655516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You expression should work if you do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BINARY_QM_$(=Year(Today())&amp;amp;Date(Today(),'MM')).qvw;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 19:15:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859054#M655516</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-06-09T19:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: BINARY load with dynamic file name</title>
      <link>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859055#M655517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think with another .qvw, all files in same dir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a1.qvw&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // make an include with a dynamic binary load&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;DIRECTORY;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;let name = 'binary a_' &amp;amp; date(today(), 'YYYYMM') &amp;amp; '.qvw;';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;tmp: &lt;/EM&gt;&lt;EM&gt;load 0 as [$(name)]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AutoGenerate 0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;store tmp into a1.inc (txt); &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;output is a1.inc&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/88846_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;a2.qvw&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // binary load&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;$(Must_Include=a1.inc);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 19:32:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859055#M655517</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-06-09T19:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: BINARY load with dynamic file name</title>
      <link>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859056#M655518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petter and thanks for the feedbackk, unfortunately it doesn't work, I'm consistently getting the same behavior in any expression I try with $(=...). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If used in the binary sentence, a "file not found" error pops up, and the filename is just as if the $(=...) returned empty string, see:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="09-06-2015 21-23-01.jpg" class="jive-image image-1" src="/legacyfs/online/88852_09-06-2015 21-23-01.jpg" style="height: 254px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My original expression had the same behavior.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried putting it into a variable like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ///$tab Main&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set x = BINARY_QM_$(=Year(Today())*100 + month(Today())).qvw;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It does not work either, in the debugging trace is shows that the dollar sign evaluates to blank:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set x = BINARY_QM_.qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas if i put in a Text Box in a sheet, the same expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ='&lt;SPAN style="font-size: 13.3333330154419px;"&gt;BINARY_QM_$(=Year(Today())*100 + month(Today())).qvw'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the expected result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BINARY_QM_201506.qvw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did I miss anything and the $(=...) expansion does NOT work on the script? If so... how can I achieve a binary load from dynamic filenames?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 19:33:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859056#M655518</guid>
      <dc:creator>jcamps</dc:creator>
      <dc:date>2015-06-09T19:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: BINARY load with dynamic file name</title>
      <link>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859057#M655519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It just tried the expression that it fully evaluated into a string that should give the filename... but let me give it a try with a real BINARY quickly and I'll come back to you...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 19:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859057#M655519</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-06-09T19:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: BINARY load with dynamic file name</title>
      <link>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859058#M655520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think the "=" within $() is a technique available in script. You can however reference a variable if you can pass the variable in. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 19:46:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859058#M655520</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2015-06-09T19:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: BINARY load with dynamic file name</title>
      <link>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859059#M655521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very nice trick / workaround Massimo! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I elaborated on your idea, since having the binary load on an external INC file was not a very secure strategy (a missing or deleted file would result in a unsecure UX document)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I finally did is:&lt;/P&gt;&lt;P&gt;a) The DATA_YYYYMM.qvw creates, on its own reloading, the a1.inc file. (using Massimo's code)&lt;/P&gt;&lt;P&gt;b) On the hidden script of the UX, i'm doing a BINARY Data_$(=Must_include=a1.inc). That way if the file is wrong it just won't load at all, keeping security at bay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- J&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 19:49:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859059#M655521</guid>
      <dc:creator>jcamps</dc:creator>
      <dc:date>2015-06-09T19:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: BINARY load with dynamic file name</title>
      <link>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859060#M655522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob, thanks... that clarifies the behavior! A pity &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should mark your answer as correct, for future or other people's reference... but I think Massimo above came out with a workaround to overcome the script syntax limitation...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jun 2015 19:53:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/859060#M655522</guid>
      <dc:creator>jcamps</dc:creator>
      <dc:date>2015-06-09T19:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: BINARY load with dynamic file name</title>
      <link>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/1824631#M1213863</link>
      <description>&lt;P&gt;Cold&amp;nbsp; you please share your Qlick files&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 22:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/BINARY-load-with-dynamic-file-name/m-p/1824631#M1213863</guid>
      <dc:creator>chetanpatel</dc:creator>
      <dc:date>2021-07-26T22:49:07Z</dc:date>
    </item>
  </channel>
</rss>

