<?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: Throw error based on Database field value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607444#M681349</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;You can do that. Logic here you will check a condition before running script.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;To control this you need to put actual code in the form of sub routines. You can have as many sub routines you want.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Just see attached QVW.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt;CheckValue&lt;BR /&gt;1&lt;BR /&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Let&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;VEXITCOUNT&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('CheckValue',0,'Exit_loop_table');&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;exit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VEXITCOUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 0;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;IF&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VEXITCOUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt; 0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Call&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;CodeScript&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;END&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Apr 2014 02:02:50 GMT</pubDate>
    <dc:creator>chiru_thota</dc:creator>
    <dc:date>2014-04-07T02:02:50Z</dc:date>
    <item>
      <title>Throw error based on Database field value</title>
      <link>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607443#M681348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is it possible to load a table according to a database filed value. ie, if the value of that field is zero then it should throw error,else it should run the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Raise Error based on DB value&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Value&lt;/P&gt;&lt;P&gt;From Xtable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if value=0,then fail script &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 01:05:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607443#M681348</guid>
      <dc:creator />
      <dc:date>2014-04-07T01:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Throw error based on Database field value</title>
      <link>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607444#M681349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;You can do that. Logic here you will check a condition before running script.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;To control this you need to put actual code in the form of sub routines. You can have as many sub routines you want.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Just see attached QVW.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt;CheckValue&lt;BR /&gt;1&lt;BR /&gt;]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Let&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;VEXITCOUNT&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('CheckValue',0,'Exit_loop_table');&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;exit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;script&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VEXITCOUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 0;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;IF&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;VEXITCOUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt; 0 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;Call&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;CodeScript&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;END&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 02:02:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607444#M681349</guid>
      <dc:creator>chiru_thota</dc:creator>
      <dc:date>2014-04-07T02:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Throw error based on Database field value</title>
      <link>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607445#M681350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for your reply, it was very much helpful , will it be possible to throw an error message when that condition not satisfied or else the script execution should be cancelled. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 04:45:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607445#M681350</guid>
      <dc:creator />
      <dc:date>2014-04-07T04:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Throw error based on Database field value</title>
      <link>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607446#M681351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try using Exit Script command conditionally, something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If( &amp;lt;condition&amp;gt;) Then&lt;/P&gt;&lt;P&gt;Exit Script;&lt;/P&gt;&lt;P&gt;End If&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 05:04:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607446#M681351</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-07T05:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Throw error based on Database field value</title>
      <link>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607447#M681352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess you will be running this task from QEMC once the development is completed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then where do you want to see the message&amp;nbsp; while QEMC running the QVW?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 15:57:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607447#M681352</guid>
      <dc:creator>chiru_thota</dc:creator>
      <dc:date>2014-04-07T15:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Throw error based on Database field value</title>
      <link>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607448#M681353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;replace 1=1 with your condition for error check&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set ErrorMode=2;&lt;/P&gt;&lt;P&gt;IF (1=1) THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp; load * Resident TableNotExists;&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you'll get a in qlik desktop&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/56759_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;on a server you can config to send an alert mail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 19:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607448#M681353</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-04-07T19:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Throw error based on Database field value</title>
      <link>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607449#M681354</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;kindly post me a sample application.&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, 08 Apr 2014 04:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607449#M681354</guid>
      <dc:creator />
      <dc:date>2014-04-08T04:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Throw error based on Database field value</title>
      <link>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607450#M681355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;in my application after successful reload it will generate a PDF and send mail using publisher .so my concern is like if the condition doesn't satisfies it wont run the script, it would show error message otherwise it will generate a PDF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thankss...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 04:47:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607450#M681355</guid>
      <dc:creator />
      <dc:date>2014-04-08T04:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Throw error based on Database field value</title>
      <link>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607451#M681356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Its easy, write an if else statement. If value is 0, ask it to look for file which will never exist. Then the job obviously fails. Use QMEC to send an email if it fails. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 00:01:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Throw-error-based-on-Database-field-value/m-p/607451#M681356</guid>
      <dc:creator />
      <dc:date>2014-04-09T00:01:50Z</dc:date>
    </item>
  </channel>
</rss>

