<?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: Conditional reload in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227822#M79914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for the reply.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this instance I am looking for indicators that the source table is incomplete.&amp;nbsp; Where I believe this to be the case I want to cancel the reload process entirely and keep the last loaded data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There was reference to using Error Codes to trigger an exit without save and I was hoping someone had an example like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Jun 2013 02:25:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-06-04T02:25:45Z</dc:date>
    <item>
      <title>Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227814#M79906</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 is the case. I need to do conditional reload. I have a table with last source database update date. This is one row table. i need the script to compare two dates - todays date and last database update date. If todays date =last update date i want the script to reload data, if not I want to exit script and save the appliaction with old data.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Apr 2010 10:47:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227814#M79906</guid>
      <dc:creator />
      <dc:date>2010-04-29T10:47:10Z</dc:date>
    </item>
    <item>
      <title>Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227815#M79907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;If I understand, you need such as:&lt;/P&gt;&lt;P&gt;tmpLastUpdateDate:&lt;/P&gt;&lt;P&gt;LOAD [Last Update Date]; SQL SELECT "Last Update Date" FROM SystemTable;&lt;/P&gt;&lt;P&gt;LET vLastUpdDate = peek('Last Update Date', 0);&lt;/P&gt;&lt;P&gt;IF $(vLastUpdDate = Today(1) THEN&lt;/P&gt;&lt;P&gt;//load your data from DB&lt;/P&gt;&lt;P&gt;LOAD ... FROM...&lt;/P&gt;&lt;P&gt;ELSE&lt;/P&gt;&lt;P&gt;exit script;&lt;/P&gt;&lt;P&gt;END IF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Apr 2010 10:58:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227815#M79907</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2010-04-29T10:58:30Z</dc:date>
    </item>
    <item>
      <title>Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227816#M79908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. It seems to be good idea for one LOAD statement but I am not sure if it will work with whole script (more LOAD statements). Can I put more load statements sth like this&lt;/P&gt;&lt;P&gt;IF $(vLastUpdDate = Today(1) THEN&lt;/P&gt;&lt;P&gt;//load your data from DB&lt;/P&gt;&lt;P&gt;LOAD ... FROM...&lt;/P&gt;&lt;P&gt;LOAD ... FROM...&lt;/P&gt;&lt;P&gt;LOAD ... FROM...&lt;/P&gt;&lt;P&gt;LOAD ... FROM...&lt;/P&gt;&lt;P&gt;LOAD ... FROM...&lt;/P&gt;&lt;P&gt;ELSE&lt;/P&gt;&lt;P&gt;exit script;&lt;/P&gt;&lt;P&gt;END IF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Apr 2010 11:08:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227816#M79908</guid>
      <dc:creator />
      <dc:date>2010-04-29T11:08:44Z</dc:date>
    </item>
    <item>
      <title>Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227817#M79909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course, you can.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Apr 2010 11:19:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227817#M79909</guid>
      <dc:creator>sparur</dc:creator>
      <dc:date>2010-04-29T11:19:34Z</dc:date>
    </item>
    <item>
      <title>Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227818#M79910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold; text-align: left"&gt;This is an example from reference manua page no. 502&lt;/P&gt;&lt;P style="font-weight: bold; text-align: left"&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;B&gt;&lt;/B&gt;&lt;PRE style="margin: 0px;"&gt;&lt;B&gt;&lt;BR /&gt;&lt;BR align="left" /&gt;QV_Table:&lt;BR /&gt;&lt;BR align="left" /&gt;SQL SELECT PrimaryKey, X, Y FROM DB_TABLE&lt;BR /&gt;&lt;BR align="left" /&gt;WHERE ModificationTime &amp;gt;= #$(LastExecTime)#&lt;BR /&gt;&lt;BR align="left" /&gt;AND ModificationTime &amp;lt; #$(BeginningThisExecTime)#;&lt;BR /&gt;&lt;BR align="left" /&gt;Concatenate&lt;BR /&gt;&lt;BR align="left" /&gt;LOAD PrimaryKey, X, Y FROM File.QVD;&lt;BR /&gt;&lt;BR /&gt;STORE QV_Table INTO File.QVD;&lt;BR /&gt;&lt;/B&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I hope this may be useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Apr 2010 12:17:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227818#M79910</guid>
      <dc:creator>prabhu0505</dc:creator>
      <dc:date>2010-04-29T12:17:57Z</dc:date>
    </item>
    <item>
      <title>Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227819#M79911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey michal,&lt;/P&gt;&lt;P&gt;How did you achieve this?&lt;/P&gt;&lt;P&gt;For me the exit script will exit from the script and save the qvw with no data.&lt;/P&gt;&lt;P&gt;How can I retain the old data? ie, how can exit from script without saving the document?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Robins.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: I am reloading the document using QV 9.0 Server Management console.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 09:29:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227819#M79911</guid>
      <dc:creator />
      <dc:date>2010-08-16T09:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227820#M79912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do a similar thing.&amp;nbsp; Test my table and if happy let the standard reloads occur.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, if my test of the table fails I want to exit the script without saving so that the last good version stays good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code below checks that the table has &amp;gt;= 44 million rows.&amp;nbsp; The IF statement works and exits the script but wipes all content from the current tables.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to keep the content of my QVW if the script exits.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ROWCounted;&lt;/P&gt;&lt;P&gt;SQL SELECT COUNT(*) AS ROWCounted&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM [HealthCentral].[dbo].[WaitingListHistory];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vRowCount =&amp;nbsp;&amp;nbsp; peek('ROWCounted',0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF $(vRowCount) &amp;lt; 44000000000 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Script;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 00:12:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227820#M79912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-04T00:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227821#M79913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your instance, Prabhu's example would like something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;LOAD&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ROWCounted;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;SQL SELECT COUNT(*) AS ROWCounted&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp; FROM [HealthCentral].[dbo].[WaitingListHistory];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;LET vRowCount =&amp;nbsp;&amp;nbsp; peek('ROWCounted',0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;IF $(vRowCount) &amp;lt; 44000000000 THEN&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WaitingListHistory:&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD a, b, c FROM File.QVD (QVD);&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;ELSE&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;WaitingListHistory:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL SELECT a, b, c FROM &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;[dbo].[WaitingListHistory];&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;END IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE &lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;WaitingListHistory&lt;/SPAN&gt; INTO File.qvd (QVD);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 02:12:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227821#M79913</guid>
      <dc:creator />
      <dc:date>2013-06-04T02:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227822#M79914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for the reply.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this instance I am looking for indicators that the source table is incomplete.&amp;nbsp; Where I believe this to be the case I want to cancel the reload process entirely and keep the last loaded data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There was reference to using Error Codes to trigger an exit without save and I was hoping someone had an example like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 02:25:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227822#M79914</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-04T02:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227823#M79915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see.&amp;nbsp; That does sound like a neater solution if you have multiple tables to check and load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 02:34:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227823#M79915</guid>
      <dc:creator />
      <dc:date>2013-06-04T02:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional reload</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227824#M79916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I worked it out. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of an exit script I just place a LOAD statement which references an unknown table.&amp;nbsp; This causes an error which stops the reload without saving changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ROWCounted;&lt;/P&gt;&lt;P&gt;SQL SELECT COUNT(*) AS ROWCounted&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM [HealthCentral].[dbo].[WaitingListHistory];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vRowCount =&amp;nbsp;&amp;nbsp; peek('ROWCounted',0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF $(vRowCount) &amp;lt; 44000000 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD x RESIDENT y;&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jun 2013 03:02:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-reload/m-p/227824#M79916</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-06-04T03:02:42Z</dc:date>
    </item>
  </channel>
</rss>

