<?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: Qlik Sense load script examples with error variables usage in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-load-script-examples-with-error-variables-usage/m-p/1127585#M19692</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there's no error then the errorcode is empty, not 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this to see an actual error:&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 NoSuchTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vScriptError = 'Errorcode: ' &amp;amp; '$(ScriptError)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SET ErrorMode = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 May 2016 09:50:10 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-05-12T09:50:10Z</dc:date>
    <item>
      <title>Qlik Sense load script examples with error variables usage</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-load-script-examples-with-error-variables-usage/m-p/1127584#M19691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone has Qlik Sense load script examples where error variables are used?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.qlik.com/en-US/sense/2.0/Subsystems/Hub/Content/Scripting/ErrorVariables/ErrorVariables.htm"&gt;http://help.qlik.com/en-US/sense/2.0/Subsystems/Hub/Content/Scripting/ErrorVariables/ErrorVariables.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I am trying out below simple script -&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xyz:&lt;/P&gt;&lt;P&gt; load * inline [ x,y &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,1];&lt;/P&gt;&lt;P&gt;let vScriptError = ScriptError; &lt;/P&gt;&lt;P&gt;Trace $(vScriptError);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Per the documentation, I expect it to log ‘0’ in the output. It doesn’t though. Any ideas why it's not printing 0?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 19:40:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-load-script-examples-with-error-variables-usage/m-p/1127584#M19691</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-11T19:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense load script examples with error variables usage</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-load-script-examples-with-error-variables-usage/m-p/1127585#M19692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there's no error then the errorcode is empty, not 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this to see an actual error:&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 NoSuchTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vScriptError = 'Errorcode: ' &amp;amp; '$(ScriptError)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SET ErrorMode = 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 09:50:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-load-script-examples-with-error-variables-usage/m-p/1127585#M19692</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-05-12T09:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense load script examples with error variables usage</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-load-script-examples-with-error-variables-usage/m-p/1127586#M19693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Wassenaar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I execute your script with slight modification , Trace does print the error message when an error is there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; set ErrorMode =0;&lt;/P&gt;&lt;P&gt; LOAD * FROM NoSuchTable;&lt;/P&gt;&lt;P&gt; LET vScriptError = 'Errorcode: ' &amp;amp; ScriptError;&lt;/P&gt;&lt;P&gt; Trace $(vScriptError); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually per Qlik Sense help , Script Error should return 0 if no error is there.&lt;/P&gt;&lt;P&gt;See this help section on Script Error&amp;nbsp; &lt;A href="http://help.qlik.com/en-US/sense/2.0/Subsystems/Hub/Content/Scripting/ErrorVariables/ScriptError.htm" title="http://help.qlik.com/en-US/sense/2.0/Subsystems/Hub/Content/Scripting/ErrorVariables/ScriptError.htm"&gt;ScriptError ‒ Qlik Sense&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when there are no errors, then &lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;if ScriptError=0 condition works. Problem was when I try to print the value in output. Tony Ventura from Qlik helped me out with this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;I was basically missing '#' in front of the variable. Below will print '0'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Tahoma',sans-serif; color: #1f497d;"&gt;load * inline [ x,y &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Tahoma',sans-serif; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,1];&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Tahoma',sans-serif; color: #1f497d;"&gt;let vScriptError = ScriptError; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Tahoma',sans-serif; color: #1f497d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Trace vScriptError = $(&lt;/SPAN&gt;&lt;STRONG style="color: red; font-size: 14.0pt; font-family: 'Tahoma',sans-serif;"&gt;#&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Tahoma',sans-serif; color: #1f497d;"&gt;vScriptError);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0f0f0f; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 15:06:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-load-script-examples-with-error-variables-usage/m-p/1127586#M19693</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-12T15:06:42Z</dc:date>
    </item>
  </channel>
</rss>

