<?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 Save to CSV with if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053948#M353452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a process that is run every 10 minutes which does it thing. Now I've been asked to have an snapshot of information every 6 hours only. Instead of creating another QVD that runs every 6 hours, is there a way to Store the information every 6 hours in the document that runs every 10 minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I'm looking at the script and seeing if I can do something to this extent but qlikview doesn't like that.&lt;/P&gt;&lt;P&gt;#simplified example&lt;/P&gt;&lt;P&gt;If(time = 6)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;Store Table INTO test.csv&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas are greatly appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Feb 2016 23:55:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-02-29T23:55:19Z</dc:date>
    <item>
      <title>Save to CSV with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053948#M353452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a process that is run every 10 minutes which does it thing. Now I've been asked to have an snapshot of information every 6 hours only. Instead of creating another QVD that runs every 6 hours, is there a way to Store the information every 6 hours in the document that runs every 10 minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I'm looking at the script and seeing if I can do something to this extent but qlikview doesn't like that.&lt;/P&gt;&lt;P&gt;#simplified example&lt;/P&gt;&lt;P&gt;If(time = 6)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;Store Table INTO test.csv&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas are greatly appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 23:55:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053948#M353452</guid>
      <dc:creator />
      <dc:date>2016-02-29T23:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Save to CSV with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053949#M353453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps like this. I've not waited 6 hours to make sure it works when the file already exists, but I'd expect it to. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;STORE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; [Test] &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Test.qvd (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;QVD&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vNow&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1);&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;filetime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Test.csv');&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vHours&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;rangesum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;now&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(1),-&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;filetime&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Test.csv')) * 24;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;TRACE&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt;&amp;gt; Now = &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vNow)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;TRACE&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt;&amp;gt; Test.csv created = &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vFile)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;TRACE&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt;&amp;gt; Hours difference = &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vHours)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;IF&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vHours)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt; 5.95 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;THEN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORE&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; [Test] &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INTO&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Test.csv (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;END&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IF&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 01:21:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053949#M353453</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-03-01T01:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Save to CSV with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053950#M353454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John, good to see you back on the community.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 02:46:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053950#M353454</guid>
      <dc:creator />
      <dc:date>2016-03-01T02:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Save to CSV with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053951#M353455</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;Is it possible to do something like the below?&lt;/P&gt;&lt;P&gt;if(Date(now(1), 'H:mm') &amp;gt;= '17:00') OR &lt;SPAN style="font-size: 13.3333px;"&gt;(Date(now(1), 'H:mm') &amp;gt; '17:10') &lt;/SPAN&gt;THEN&lt;/P&gt;&lt;P&gt;STORE Customers INTO Test.csv (TXT);&lt;/P&gt;&lt;P&gt;END IF &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried it the script does not throw an error, but it does not save a file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 23:49:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053951#M353455</guid>
      <dc:creator />
      <dc:date>2016-03-07T23:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Save to CSV with if statement</title>
      <link>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053952#M353456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IF((ReloadTime()&amp;gt;=timestamp(Today() + maketime(5)) AND ReloadTime()&amp;lt;timestamp(Today() + maketime(5,10))) OR (ReloadTime()&amp;gt;=timestamp(Today() + maketime(17)) AND ReloadTime()&amp;lt;timestamp(Today() + maketime(17,50)))) THEN&lt;/P&gt;&lt;P&gt; STORE [Customers] INTO Test.csv (TXT);&lt;/P&gt;&lt;P&gt;END IF &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That worked!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Mar 2016 23:55:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Save-to-CSV-with-if-statement/m-p/1053952#M353456</guid>
      <dc:creator />
      <dc:date>2016-03-07T23:55:54Z</dc:date>
    </item>
  </channel>
</rss>

