<?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 How to display error message on button reload? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-display-error-message-on-button-reload/m-p/2072638#M87982</link>
    <description>&lt;P&gt;Hello all, after searching I cannot seem to find an answer. I have an app with a button that allows users to reload an app on Qlik Cloud. The issue is if the reload fails due to an error, there is no indication to the user making them aware of the error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can we capture a load script error and display the error details to the user within a text box on a sheet?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 22:08:28 GMT</pubDate>
    <dc:creator>jackm75</dc:creator>
    <dc:date>2023-05-17T22:08:28Z</dc:date>
    <item>
      <title>How to display error message on button reload?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-display-error-message-on-button-reload/m-p/2072638#M87982</link>
      <description>&lt;P&gt;Hello all, after searching I cannot seem to find an answer. I have an app with a button that allows users to reload an app on Qlik Cloud. The issue is if the reload fails due to an error, there is no indication to the user making them aware of the error.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can we capture a load script error and display the error details to the user within a text box on a sheet?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 22:08:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-display-error-message-on-button-reload/m-p/2072638#M87982</guid>
      <dc:creator>jackm75</dc:creator>
      <dc:date>2023-05-17T22:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to display error message on button reload?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-display-error-message-on-button-reload/m-p/2072822#M87992</link>
      <description>&lt;P&gt;You can try something like below&lt;/P&gt;
&lt;P&gt;=If(ErrorCount &amp;gt; 0, 'Load script error: ' &amp;amp; ErrorText)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 10:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-display-error-message-on-button-reload/m-p/2072822#M87992</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2023-05-18T10:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to display error message on button reload?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-display-error-message-on-button-reload/m-p/2072895#M87995</link>
      <description>&lt;P&gt;Thanks for the reply, but that isn't working for me. Note that I also tried using the variables ScriptErrorCount, ScriptError, ScriptErrorList and ScriptErrorDetails.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When in debugging mode, I can see that ScriptErrorCount = 1; ScriptErrorDetails has value. However, it's not showing up in the text box on the sheet. In the box, ScriptErrorCount is 0 and the others are empty. So, it seems it's not saving the variable values after load fail. Is this perhaps a limitation on SaaS (Cloud) vs Windows?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 13:51:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-display-error-message-on-button-reload/m-p/2072895#M87995</guid>
      <dc:creator>jackm75</dc:creator>
      <dc:date>2023-05-18T13:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to display error message on button reload?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-display-error-message-on-button-reload/m-p/2072923#M87996</link>
      <description>&lt;P&gt;Here's what I was able to get to work:&lt;/P&gt;
&lt;P&gt;In the load script Set ErrorMode=0;&lt;/P&gt;
&lt;P&gt;After each section that has a potential to fail, added:&lt;/P&gt;
&lt;P&gt;Set vCustomErrMessage = '$(ScriptErrorDetails)';&lt;BR /&gt;IF $(ScriptErrorCount) &amp;gt;= 1 THEN&lt;BR /&gt;Exit Script; //since errmode 0 will continue, I want to exit if there is an error&lt;BR /&gt;END IF&lt;/P&gt;
&lt;P&gt;In the sheet text box added:&lt;/P&gt;
&lt;P&gt;=&lt;BR /&gt;If($(ScriptErrorCount) &amp;gt;0,&lt;BR /&gt;'Error Message: ' &amp;amp; '$(vCustomErrMessage)'&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 15:00:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-display-error-message-on-button-reload/m-p/2072923#M87996</guid>
      <dc:creator>jackm75</dc:creator>
      <dc:date>2023-05-18T15:00:14Z</dc:date>
    </item>
  </channel>
</rss>

