<?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: In a reload script and reload task, raise exception if &amp;quot;0 lines fetched&amp;quot; in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256045#M25438</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would Exit Script; cause the task to end in failure in QMC?&amp;nbsp; Because this is what I want.&amp;nbsp; I need an easy way to, at a glance, tell fail from success of my tasks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Nov 2016 16:42:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-11-30T16:42:40Z</dc:date>
    <item>
      <title>In a reload script and reload task, raise exception if "0 lines fetched"</title>
      <link>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256041#M25434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&amp;nbsp; How can I raise an exception if I have a "0 lines fetched" during any point in the reload task?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2016-11-30 08:00:06 0104 FROM [myDatabase].[dbo].[myTransactionsTable]&lt;/P&gt;&lt;P&gt;2016-11-30 08:00:06 0105 WHERE TranType IN (&lt;/P&gt;&lt;P&gt;2016-11-30 08:00:06 0106 'buy'&lt;/P&gt;&lt;P&gt;2016-11-30 08:00:06 0107 ,'sell'&lt;/P&gt;&lt;P&gt;2016-11-30 08:00:06 0108 )&lt;/P&gt;&lt;P&gt;2016-11-30 08:00:06 0109 AND InvCode NOT LIKE '%collateral%'&lt;/P&gt;&lt;P&gt;2016-11-30 08:00:06 0110&lt;/P&gt;&lt;P&gt;2016-11-30 08:00:06 0111 ORDER BY TDate DESC&lt;/P&gt;&lt;P&gt;2016-11-30 08:00:07&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30 fields found: *** OMITTED FOR BREVITY ***&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;2016-11-30 08:00:07&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 lines fetched&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 16:15:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256041#M25434</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-30T16:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: In a reload script and reload task, raise exception if "0 lines fetched"</title>
      <link>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256042#M25435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khoa, the function NoOfRows('TableName') returns the number of rows, you can check if it's equal to zero.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 16:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256042#M25435</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-30T16:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: In a reload script and reload task, raise exception if "0 lines fetched"</title>
      <link>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256043#M25436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How do I then raise an exception?&amp;nbsp; Thus marking reload task as failure?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 16:33:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256043#M25436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-30T16:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: In a reload script and reload task, raise exception if "0 lines fetched"</title>
      <link>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256044#M25437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Khoa, you can finish the reload with "Exit Script;" Is this what you want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use it like:&lt;/P&gt;&lt;P&gt;Exit script when NoOfRows('TableName')=0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or:&lt;/P&gt;&lt;P&gt;IF NoOfRows('TableName')=0 THEN&lt;/P&gt;&lt;P&gt;Exit Script;&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 16:38:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256044#M25437</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2016-11-30T16:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: In a reload script and reload task, raise exception if "0 lines fetched"</title>
      <link>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256045#M25438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would Exit Script; cause the task to end in failure in QMC?&amp;nbsp; Because this is what I want.&amp;nbsp; I need an easy way to, at a glance, tell fail from success of my tasks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 16:42:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256045#M25438</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-30T16:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: In a reload script and reload task, raise exception if "0 lines fetched"</title>
      <link>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256046#M25439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The only way to raise an exception is to introduce an intentional syntax error like this:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;IF NoOfRows('TableName')=0 THEN&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Failing due to no rows;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ENDIF&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The "Failing due to no rows" is an invalid statement, but it will nicely show as the error cause as well.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 16:44:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/In-a-reload-script-and-reload-task-raise-exception-if-quot-0/m-p/1256046#M25439</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2016-11-30T16:44:43Z</dc:date>
    </item>
  </channel>
</rss>

