<?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: Error handling in script in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1540030#M38985</link>
    <description>&lt;P&gt;Good idea! Thanks everyone for your help.&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
    <pubDate>Wed, 06 Feb 2019 08:33:49 GMT</pubDate>
    <dc:creator>josemaria_cabre</dc:creator>
    <dc:date>2019-02-06T08:33:49Z</dc:date>
    <item>
      <title>Error handling in script</title>
      <link>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1538506#M38875</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;Let's imagine we have this load statement that&amp;nbsp;we&amp;nbsp;execute e.g.&amp;nbsp;once a week:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="3"&gt;[data]:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;&amp;nbsp;[Reservation id],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;&amp;nbsp;[ID member],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;&amp;nbsp;[Code MA],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;&amp;nbsp;[Registration date],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;&amp;nbsp;FROM [lib://Folder/file.csv]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;(txt, codepage is 28591, embedded labels, delimiter is '\t', msq)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;But .csv&amp;nbsp;coding&amp;nbsp; from file.csv might change from one week to another, and instead of:&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;(txt, codepage is 28591, embedded labels, delimiter is '\t', msq)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;This week's coding&amp;nbsp;will be:&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;(txt, utf8, embedded labels, delimiter is ';', msq);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;So we'll get a 'Field xxxx&amp;nbsp;not found' error&amp;nbsp;when executing our script.&lt;/P&gt;&lt;P&gt;Is there any way&amp;nbsp;to&amp;nbsp;load [data] table again using an alternative .csv coding when such an error occurs?&lt;/P&gt;&lt;P&gt;I tried using&amp;nbsp; the 'ScriptError' function with no success on my script. Could anyone help with this issue?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help,&lt;BR /&gt;Jose.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 14:59:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1538506#M38875</guid>
      <dc:creator>josemaria_cabre</dc:creator>
      <dc:date>2019-02-01T14:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Error handling in script</title>
      <link>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1538530#M38876</link>
      <description>&lt;P&gt;Can you share the error handling script you&amp;nbsp;used?&lt;/P&gt;&lt;P&gt;Hope you set the errormode to 0&lt;/P&gt;&lt;P&gt;below has worked for me in past&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;set ErrorMode=0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;load * from abc.csv;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if ’$(ScriptError)’=’File Not Found’ then&amp;nbsp; // or if ScriptError=8 then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//execute the error handling statements&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;end if&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;in your case script error should 11 ofcourse&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 15:16:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1538530#M38876</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-02-01T15:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error handling in script</title>
      <link>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1538534#M38878</link>
      <description>&lt;P&gt;I tried this:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;set ErrorMode=0;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;[data]:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;[Reservation id],&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;[ID member],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;[Code MA],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;[Registration date],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;[Agent name]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FROM [lib://Folder/file.csv]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;(txt, utf8, embedded labels, delimiter is ';', msq);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if ScriptError=11 then&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[data]:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;[Reservation id],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;[ID member],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;[Code MA],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;[Registration date],&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;[Agent name]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FROM [lib://Folder/file.csv]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;(txt, codepage is 28591, embedded labels, delimiter is '\t', msq);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;end if&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Feb 2019 15:26:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1538534#M38878</guid>
      <dc:creator>josemaria_cabre</dc:creator>
      <dc:date>2019-02-01T15:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error handling in script</title>
      <link>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1538549#M38881</link>
      <description>&lt;P&gt;Hm.. weird&lt;/P&gt;&lt;P&gt;I just tried simulating the issue with a wrong column name and it worked.&lt;/P&gt;&lt;P&gt;Try debugging&amp;nbsp;and check exact text of the ScriptError. and/or try use the text comparison&lt;/P&gt;&lt;P&gt;maybe its 12 not 11&lt;/P&gt;&lt;P&gt;&lt;EM&gt;below from help page&lt;/EM&gt;&lt;/P&gt;&lt;TABLE cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;11&lt;/TD&gt;&lt;TD&gt;Field not found&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12&lt;/TD&gt;&lt;TD&gt;File has wrong format&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 01 Feb 2019 16:00:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1538549#M38881</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-02-01T16:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: Error handling in script</title>
      <link>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1538994#M38908</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;You were right. Script executes and it loads data&amp;nbsp;&amp;nbsp;from file.csv, but still&amp;nbsp;a message "errors were found during execution" is shown in data load progress window.&lt;/P&gt;&lt;P&gt;Is there any way to avoid this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.png" style="width: 585px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5121iB38D6F62C717824C/image-size/large?v=v2&amp;amp;px=999" role="button" title="error.png" alt="error.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 10:17:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1538994#M38908</guid>
      <dc:creator>josemaria_cabre</dc:creator>
      <dc:date>2019-02-04T10:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Error handling in script</title>
      <link>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1539664#M38960</link>
      <description>&lt;P&gt;Hola Jose,&lt;/P&gt;&lt;P&gt;As far as know there's no way to avoid this error message. What I do is to write a message in a TRACE saying&amp;nbsp;that it's not an error and the message should be ignored.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Jay&lt;/P&gt;</description>
      <pubDate>Tue, 05 Feb 2019 13:28:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1539664#M38960</guid>
      <dc:creator>jaygarcia</dc:creator>
      <dc:date>2019-02-05T13:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Error handling in script</title>
      <link>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1540030#M38985</link>
      <description>&lt;P&gt;Good idea! Thanks everyone for your help.&lt;/P&gt;&lt;P&gt;Jose&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 08:33:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-handling-in-script/m-p/1540030#M38985</guid>
      <dc:creator>josemaria_cabre</dc:creator>
      <dc:date>2019-02-06T08:33:49Z</dc:date>
    </item>
  </channel>
</rss>

