<?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 script load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558013#M687610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerome,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have more than 2 tables in QVW then its not possible to refresh one and load the second as previous data.&lt;/P&gt;&lt;P&gt;QVW will refresh the entire data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I am getting your point then you can search for Incremental load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Dec 2013 10:38:45 GMT</pubDate>
    <dc:creator>qlikpahadi07</dc:creator>
    <dc:date>2013-12-11T10:38:45Z</dc:date>
    <item>
      <title>Conditional script load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558009#M687605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;I would like to know if there is a way to do a test in a load script.e.g, I want only load a table if the last refresh date is different than the date of today.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF reloadtime() &amp;lt;&amp;gt; today then&lt;/P&gt;&lt;P&gt;table1 :&lt;/P&gt;&lt;P&gt;load ....&lt;/P&gt;&lt;P&gt;from ...&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;end if;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 08:43:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558009#M687605</guid>
      <dc:creator />
      <dc:date>2013-12-11T08:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional script load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558010#M687606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class="replyToName"&gt;Jérôme&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;You could try something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;//Set the variables&lt;/P&gt;&lt;P&gt;Let vtime = Date(ReloadTime(),'DD/MM/YYYY');&lt;/P&gt;&lt;P&gt;Let vtoday = Date(now(),'DD/MM/YYYY');&lt;/P&gt;&lt;P&gt;LET vFilePath = 'C:\Test';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//If the 2 dates are the same, do nothing&lt;/P&gt;&lt;P&gt;if $(vtime) = $(vtoday) then&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;//If the 2 dates differ, load the table (and store into a QVD)&lt;/P&gt;&lt;P&gt;If $(vtime) &amp;lt;&amp;gt; $(vtoday) then&lt;/P&gt;&lt;P&gt;TEST:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;* Inline [&lt;/P&gt;&lt;P&gt;FieldOne, FieldTwo&lt;/P&gt;&lt;P&gt;Test1, Test2&lt;/P&gt;&lt;P&gt;Test3, Test4&lt;/P&gt;&lt;P&gt;]; &lt;/P&gt;&lt;P&gt;Store TEST into $(vFilePath)\TEST.qvd(qvd);&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;P&gt;&lt;STRONG class="font-color-meta"&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Let me know if that doesn't help and I'll see if I can think more for you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="replyToName"&gt;Justine&lt;/SPAN&gt;&lt;STRONG class="font-color-meta"&gt;&lt;SPAN class="replyToName"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 09:02:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558010#M687606</guid>
      <dc:creator />
      <dc:date>2013-12-11T09:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional script load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558011#M687608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Justine,&lt;/P&gt;&lt;P&gt;Thanks for this syntax. It works. But now my table is empty.&lt;/P&gt;&lt;P&gt;I thought that the old values were still there. But no.&lt;/P&gt;&lt;P&gt;I just would keep older values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 09:11:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558011#M687608</guid>
      <dc:creator />
      <dc:date>2013-12-11T09:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional script load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558012#M687609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had a very quick look.&amp;nbsp; Do you have somewhere that you can keep qvd files? My preference would be to use a qvd and then do the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vtime = Date(ReloadTime(),'DD/MM/YYYY');&lt;/P&gt;&lt;P&gt;Let vtoday = Date(now(),'DD/MM/YYYY');&lt;/P&gt;&lt;P&gt;LET vFilePath = 'C:\Test';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// If the dates are equal, load the existing qvd back into the table&lt;/P&gt;&lt;P&gt;if $(vtime) = $(vtoday) then&lt;/P&gt;&lt;P&gt;TEST:&lt;/P&gt;&lt;P&gt;Load * from $(vFilePath)\TEST.qvd(qvd);&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// If dates are not equal, Load whatever you need here&lt;/P&gt;&lt;P&gt;If $(vtime) &amp;lt;&amp;gt; $(vtoday) then&lt;/P&gt;&lt;P&gt;TEST:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;* Inline [&lt;/P&gt;&lt;P&gt;FieldOne, FieldTwo&lt;/P&gt;&lt;P&gt;Test1, Test2&lt;/P&gt;&lt;P&gt;Test3, Test4&lt;/P&gt;&lt;P&gt;]; &lt;/P&gt;&lt;P&gt;//Store new data into the qvd&lt;/P&gt;&lt;P&gt;Store TEST into $(vFilePath)\TEST.qvd(qvd);&lt;/P&gt;&lt;P&gt;ENDIF;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure if there's a way of retaining data in an actual table in a script - hence the use of a reload from a QVD. This could have an impact on storage space etc though if your datasets are large. It could also take longer to run the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully, someone will post on here with some code that will allow the table to retain the data that was already in it - that would be really useful. In the meantime, the above solution will work, but is more clumsy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know how you get on.&lt;/P&gt;&lt;P&gt;Justine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 10:16:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558012#M687609</guid>
      <dc:creator />
      <dc:date>2013-12-11T10:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional script load</title>
      <link>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558013#M687610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jerome,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you have more than 2 tables in QVW then its not possible to refresh one and load the second as previous data.&lt;/P&gt;&lt;P&gt;QVW will refresh the entire data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if I am getting your point then you can search for Incremental load.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2013 10:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Conditional-script-load/m-p/558013#M687610</guid>
      <dc:creator>qlikpahadi07</dc:creator>
      <dc:date>2013-12-11T10:38:45Z</dc:date>
    </item>
  </channel>
</rss>

