<?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: Storing the 'ScriptError' value in a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385937#M144144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for getting back. Yes the Num(ScriptError) worked well!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i don't understand why you can only populate one variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run the following example var2 is populated, but if you then uncomment var1 then var2 does not update. It's as though the ScriptError variables are reset immediately after the next step??!?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you think of a way of capturing all three variables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;ErrorMode&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;=0;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; abc.qvw; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//considering that abc.qvw doesn't exist&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//let var1 =&amp;nbsp; ScriptError;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;var2&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; =&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ScriptErrorDetails&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//let var3 =&amp;nbsp; num(ScriptError); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Oct 2012 19:53:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-10-30T19:53:22Z</dc:date>
    <item>
      <title>Storing the 'ScriptError' value in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385933#M144140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to do this???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have tried;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vScriptError = ScriptError;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This doesn't work! Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 16:48:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385933#M144140</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-30T16:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Storing the 'ScriptError' value in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385934#M144141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;This piece of code works: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set ErrorMode=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; load * from abc.qvw; //considering that abc.qvw doesn't exist&lt;/P&gt;&lt;P&gt;&amp;nbsp; let var =&amp;nbsp; ScriptError;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 17:05:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385934#M144141</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2012-10-30T17:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Storing the 'ScriptError' value in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385935#M144142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That does work, but i am looking for the ScriptError number as well as the ScriptErrorDetails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let var =&amp;nbsp; ScriptError;&lt;/P&gt;&lt;P&gt;let var1 =&amp;nbsp; ScriptErrorDetails;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var = 'File Not Found' not '8'&lt;/P&gt;&lt;P&gt;var1 = 'null' not 'Cannot open file...etc'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 17:27:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385935#M144142</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-30T17:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Storing the 'ScriptError' value in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385936#M144143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, I got what happened to ScriptError. Apparently, the data type is dual ( number and string). &lt;/P&gt;&lt;P&gt;You can get the 8 using this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let var =&amp;nbsp; num(ScriptError);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For scriptErrorDetails, maybe it will not return a description for this case, since the 'File not Found' might be enough. &lt;/P&gt;&lt;P&gt;According to QV Help, it will return details for errors 3 and 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor579"&gt;&lt;/A&gt;&lt;A name="ScriptErrorDetails"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;ScriptErrorDetails&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns a more detailed error description for some of the error codes above. Most importantly this variable will contain the error message returned by ODBC and OLE DB drivers for error codes 3 and 4. &lt;/P&gt;&lt;P&gt;Hope it helps, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 17:37:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385936#M144143</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2012-10-30T17:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Storing the 'ScriptError' value in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385937#M144144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for getting back. Yes the Num(ScriptError) worked well!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i don't understand why you can only populate one variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run the following example var2 is populated, but if you then uncomment var1 then var2 does not update. It's as though the ScriptError variables are reset immediately after the next step??!?!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you think of a way of capturing all three variables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;ErrorMode&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;=0;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; abc.qvw; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//considering that abc.qvw doesn't exist&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//let var1 =&amp;nbsp; ScriptError;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;var2&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; =&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;ScriptErrorDetails&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//let var3 =&amp;nbsp; num(ScriptError); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 19:53:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385937#M144144</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-30T19:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Storing the 'ScriptError' value in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385938#M144145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Script Error is reset if the next executed statement is executed succesfully&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the list error details from the ScriptErrorList.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Help File:&lt;/P&gt;&lt;P class="syntax"&gt;&lt;A name="kanchor578"&gt;&lt;/A&gt;&lt;A name="ScriptError"&gt;&lt;/A&gt;&lt;SPAN class="Bold"&gt;ScriptError&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Returns the error code of the last executed script statement. &lt;STRONG&gt;This variable will be reset to 0 after each successfully executed script statement.&lt;/STRONG&gt; If an error occurs it will be set to an internal QlikView error code. Error codes are dual values with a numeric and a text component. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 20:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385938#M144145</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-10-30T20:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Storing the 'ScriptError' value in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385939#M144146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help, but i've decided to go with this and it works well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set &lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;ErrorMode&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;=0;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; abc.qvw; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//considering that abc.qvw doesn't exist&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;ErrorLog:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;'$(ScriptErrorCount)' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;vScriptErrorCount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;BR /&gt;'$(#ScriptError)' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;vScriptErrorNo&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;BR /&gt;'$(ScriptError)' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;vScriptError&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt;&lt;BR /&gt;'$(ScriptErrorDetails)' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;vScriptErrorDetails&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;AutoGenerate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 20:30:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385939#M144146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-30T20:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Storing the 'ScriptError' value in a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385940#M144147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats it. Great!..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Oct 2012 20:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Storing-the-ScriptError-value-in-a-variable/m-p/385940#M144147</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-10-30T20:51:36Z</dc:date>
    </item>
  </channel>
</rss>

