<?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 How can I intentionally create a script error? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185421#M49920</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel,that $(=0) line worked great. You're the man.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Nov 2010 21:47:12 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-12T21:47:12Z</dc:date>
    <item>
      <title>How can I intentionally create a script error?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185417#M49916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If a certain condition is not true, I would like to intentionally fail the script execution. (I need to send an email regarding this condition from the server and not through a front - end alert..) I am having trouble devising an algorithm which fails only under this condition. Any syntax errors will fail always.&lt;/P&gt;&lt;P&gt;Ideally there would be something in my script like: if( MyConditionIsFalse, SCRIPT FAILS HERE, Script does not fail here)&lt;/P&gt;&lt;P&gt;Thoughts? Thanks!&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 19:35:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185417#M49916</guid>
      <dc:creator />
      <dc:date>2010-11-12T19:35:48Z</dc:date>
    </item>
    <item>
      <title>How can I intentionally create a script error?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185418#M49917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Scott,&lt;/P&gt;&lt;P&gt;You can use at any time&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;EXIT SCRIPT;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'd set a variable and depending on the conditions you want, check in the script from time to time the variable. If the variable is equal to 1, then exit script, otherwise, keep executing the script.&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 19:40:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185418#M49917</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-11-12T19:40:54Z</dc:date>
    </item>
    <item>
      <title>How can I intentionally create a script error?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185419#M49918</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am aware of the exit script command, but that will stop the script without producing an error. I am wondering if there is a way to have the script execution "fail", not just quit.&lt;/P&gt;&lt;P&gt;(Side note, how would you put that exit script command in the middle of an if statement?)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 21:18:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185419#M49918</guid>
      <dc:creator />
      <dc:date>2010-11-12T21:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I intentionally create a script error?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185420#M49919</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;Something like this maybe?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13509004304706381" jivemacro_uid="_13509004304706381"&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;F1, F2&lt;/P&gt;&lt;P&gt;A1, B1&lt;/P&gt;&lt;P&gt;A2, B2&lt;/P&gt;&lt;P&gt;A3, B3&lt;/P&gt;&lt;P&gt;]; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vScriptStatus = NoOfRows('Table'); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Your condition here &lt;/P&gt;&lt;P&gt;IF $(vScriptStatus) &amp;gt; 1 THEN &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SET ErrorMode = 2; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vErrorCode = $(=o); // I know this casuses an internal error &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXIT SCRIPT;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 21:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185420#M49919</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-11-12T21:32:30Z</dc:date>
    </item>
    <item>
      <title>How can I intentionally create a script error?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185421#M49920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Miguel,that $(=0) line worked great. You're the man.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 21:47:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185421#M49920</guid>
      <dc:creator />
      <dc:date>2010-11-12T21:47:12Z</dc:date>
    </item>
    <item>
      <title>How can I intentionally create a script error?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185422#M49921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Scott.&lt;/P&gt;&lt;P&gt;I've set that on purpose, but any other syntax error would result on the script failing, too&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;XET vErrorCode = 1; // XET doesn't exists in QlikView&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The hard part here is to set the condition, making the script to fail is quite the simple part, in my view.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Nov 2010 22:00:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/185422#M49921</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-11-12T22:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can I intentionally create a script error?</title>
      <link>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/1840036#M1215219</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22381"&gt;@Miguel_Angel_Baeyens&lt;/a&gt;&amp;nbsp; your solution works. The other solution that is proposed above with the new updates doesn´t work propertly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;XET vErrorCode = $(=o);	&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 10:01:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-can-I-intentionally-create-a-script-error/m-p/1840036#M1215219</guid>
      <dc:creator>annacastan</dc:creator>
      <dc:date>2021-09-29T10:01:25Z</dc:date>
    </item>
  </channel>
</rss>

