<?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: must_include bug? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/must-include-bug/m-p/2159756#M1225133</link>
    <description>&lt;P&gt;The include is not a statement. It is a macro expansion.&lt;/P&gt;
&lt;P&gt;This means that the $(...) construct is replaced by the file &lt;EM&gt;before&lt;/EM&gt; the parsing of the script. It is hence &lt;EM&gt;not "&lt;/EM&gt;executed" at run-time, and therefore, the If-statement is irrelevant.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I would not consider this a bug.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jan 2024 20:50:02 GMT</pubDate>
    <dc:creator>hic</dc:creator>
    <dc:date>2024-01-09T20:50:02Z</dc:date>
    <item>
      <title>must_include bug?</title>
      <link>https://community.qlik.com/t5/QlikView/must-include-bug/m-p/138346#M605592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Running the following QlikView script produces an error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set a = 0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If false() then&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set a = 1;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(must_include=C:\file.txt);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;End if&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script Error: &lt;EM&gt;$(MUST_INCLUDE failed: C:\file.txt&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;C:\file.txt does not exist.&lt;/LI&gt;&lt;LI&gt;When I click the error message away with "Okay", the script finishes and the variable &lt;EM&gt;a&lt;/EM&gt; is set to 0.&lt;/LI&gt;&lt;LI&gt;When I create an empty file C:\file.txt, there is no error message.&lt;/LI&gt;&lt;LI&gt;When I create a file C:\file.txt containing &lt;EM&gt;Set a = 2;&lt;/EM&gt; , there is no error message. The variable &lt;EM&gt;a &lt;/EM&gt;is still set to 0 after running the script.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This looks as if the command &lt;EM&gt;$(must_include=file.txt);&lt;/EM&gt; is not executed. Otherwise, &lt;EM&gt;a&lt;/EM&gt; would have to be set to 2, when C:\file.txt exists and contains &lt;EM&gt;Set a= 2;&lt;/EM&gt;. This is the expected behaviour, since none of the commands between &lt;EM&gt;If false() then&lt;/EM&gt; and &lt;EM&gt;End if&lt;/EM&gt; should be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still, &lt;EM&gt;$(must_include=file.txt);&lt;/EM&gt; produces an error message, when the C:\file.txt does not exist, although the command is not executed. It cannot be a syntax error, since the error message is thrown depending on whether C:file.txt exists, not depending on the syntax. Is this intended behaviour or a bug? Is &lt;EM&gt;$(MUST_INCLUDE failed: C:\file.txt &lt;/EM&gt;a run-time error or a compilation error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To me it looks like a bug. The bug is a problem in a script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If condition then&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(must_include=a.txt);&lt;/EM&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Else&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(must_include=b.txt);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;End if&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This script always produces an error message, when either a.txt or b.txt does not exist, even if, for the script to work, it is not necessary that a.txt and b.txt exist.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2018 09:46:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/must-include-bug/m-p/138346#M605592</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-13T09:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: must_include bug?</title>
      <link>https://community.qlik.com/t5/QlikView/must-include-bug/m-p/2159720#M1225132</link>
      <description>&lt;P&gt;estou com mesmo problema tentando usar tanto com IF, THEN,ELSE ou com SWITCH CASE...&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 18:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/must-include-bug/m-p/2159720#M1225132</guid>
      <dc:creator>aftenier</dc:creator>
      <dc:date>2024-01-09T18:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: must_include bug?</title>
      <link>https://community.qlik.com/t5/QlikView/must-include-bug/m-p/2159756#M1225133</link>
      <description>&lt;P&gt;The include is not a statement. It is a macro expansion.&lt;/P&gt;
&lt;P&gt;This means that the $(...) construct is replaced by the file &lt;EM&gt;before&lt;/EM&gt; the parsing of the script. It is hence &lt;EM&gt;not "&lt;/EM&gt;executed" at run-time, and therefore, the If-statement is irrelevant.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I would not consider this a bug.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 20:50:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/must-include-bug/m-p/2159756#M1225133</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2024-01-09T20:50:02Z</dc:date>
    </item>
  </channel>
</rss>

