<?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: ErrorMode in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329643#M702419</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;you don't need a load statement to trigger the msgbox function. You can directly use it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set errormode=0;&lt;/P&gt;&lt;P&gt;Load * from xx;&lt;/P&gt;&lt;P&gt;if ScriptError=8 then&lt;/P&gt;&lt;P&gt;let x = msgbox('file not found', 'caption');&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another suggestion is to test if the file exists before loading it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if isnull(FileSize('c:\folder\x.txt')) then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let x = msgbox('file not found', 'caption');&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load * from c:\folder\x.txt;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2012 16:38:13 GMT</pubDate>
    <dc:creator>fosuzuki</dc:creator>
    <dc:date>2012-07-31T16:38:13Z</dc:date>
    <item>
      <title>ErrorMode</title>
      <link>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329640#M702416</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;I have a doubt here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a set the error mode to 0 and then whant to create a msgbox if an certain script error happens how can i do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set errormode=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load * from xx;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ScriptError=8 then&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;MsgBox('aa', 'aaa', 2, 48,512) as X&lt;/P&gt;&lt;P&gt;AutoGenerate 1;&lt;/P&gt;&lt;P&gt;//no file; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know if thats valid?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Eliano&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 15:45:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329640#M702416</guid>
      <dc:creator />
      <dc:date>2012-07-31T15:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: ErrorMode</title>
      <link>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329641#M702417</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; What error ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;set errormode=0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load * from xx;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ScriptError=8 then&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;MsgBox('Message 2', 'msgbox', 'OKCANCEL', 'ICONASTERISK') as x, 2 as r &lt;/P&gt;&lt;P&gt;autogenerate 1;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Details:&lt;/P&gt;&lt;TABLE cellspacing="0" class="TableStyle-LeftBold" style="margin-right: auto;"&gt;&lt;TBODY&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;1&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;No error&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;2&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;General Error&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;3&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;Syntax Error&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;4&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;General ODBC Error&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;5&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;General OLE DB Error&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;6&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;General XML Error&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;7&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;General HTML Error&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;8&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;File Not Found&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;9&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;Database Not Found&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;10&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;Table Not Found&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;11&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;Field Not Found&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1"&gt;&lt;TD class="BodyE-Column1-Body1"&gt;12&lt;/TD&gt;&lt;TD class="BodyD-Column2-Body1"&gt;File Has Wrong Format&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 15:48:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329641#M702417</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-07-31T15:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: ErrorMode</title>
      <link>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329642#M702418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't syntax checked your example, but yes, the concept is valid. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 16:30:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329642#M702418</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2012-07-31T16:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: ErrorMode</title>
      <link>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329643#M702419</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;you don't need a load statement to trigger the msgbox function. You can directly use it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set errormode=0;&lt;/P&gt;&lt;P&gt;Load * from xx;&lt;/P&gt;&lt;P&gt;if ScriptError=8 then&lt;/P&gt;&lt;P&gt;let x = msgbox('file not found', 'caption');&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another suggestion is to test if the file exists before loading it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if isnull(FileSize('c:\folder\x.txt')) then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; let x = msgbox('file not found', 'caption');&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load * from c:\folder\x.txt;&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 16:38:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329643#M702419</guid>
      <dc:creator>fosuzuki</dc:creator>
      <dc:date>2012-07-31T16:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: ErrorMode</title>
      <link>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329644#M702420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I want to ask you, is it possible to create a msgbox in your script with text: 'the missing field': &lt;/P&gt;&lt;P&gt;I mean that: &lt;/P&gt;&lt;P&gt;SET ErrorMode = 0; &lt;/P&gt;&lt;P&gt;Load * from XX; &lt;/P&gt;&lt;P&gt;If ScriptError = 11 then &lt;/P&gt;&lt;P&gt;let x = msgbox ('Field not found' , 'Name of the missing field') &lt;/P&gt;&lt;P&gt;End If ; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Jul 2014 14:26:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ErrorMode/m-p/329644#M702420</guid>
      <dc:creator />
      <dc:date>2014-07-08T14:26:34Z</dc:date>
    </item>
  </channel>
</rss>

