<?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 delay script load until data file has been updated. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-delay-script-load-until-data-file-has-been-updated/m-p/443736#M1162962</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13510038132014477" jivemacro_uid="_13510038132014477"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;I am looking for a way to make my script check the data it's trying to load and make sure it has been updated within the last 12 hours or so before continuing.&amp;nbsp; Else I want it to loop and sleep for 10 seconds and then check again until the update has completed.&amp;nbsp; I don't care if it loops indefinitely if the file doesn't update.&amp;nbsp; I will manually stop the looping when I get to work in the morning and check into things if the update doesn't happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the text I have below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory &lt;A href="https://community.qlik.com/"&gt;\\Busintel\qlikview\Source_Data\&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;do until (NOW()-Filetime(FCDATAQT.TXT))&amp;lt;.6&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt; First 5&lt;/P&gt;&lt;P&gt; LOAD @2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; NOW()-Filetime() as TestTime&lt;/P&gt;&lt;P&gt; FROM&lt;/P&gt;&lt;P&gt; &lt;A href="https://community.qlik.com/"&gt;\\Busintel\qlikview\Source_Data\FCDATAQT.TXT&lt;/A&gt;&lt;/P&gt;&lt;P&gt; (txt, codepage is 1252, no labels, delimiter is ';', msq)&lt;/P&gt;&lt;P&gt; Where (NOW()-Filetime())&amp;lt;.6;&lt;/P&gt;&lt;P&gt; Sleep(10000); &lt;/P&gt;&lt;P&gt;loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I comment the looping structure, the field TestTime = roughly .12 at the moment.&amp;nbsp; The loop continues indefinitely however.&amp;nbsp; What can I do to end the loop if TestTime is less than .6?&amp;nbsp; If I can make that happen, it would solve a great deal of issues for me and free up a lot of my time for more productive tasks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Oct 2012 14:57:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-23T14:57:29Z</dc:date>
    <item>
      <title>How to delay script load until data file has been updated.</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-delay-script-load-until-data-file-has-been-updated/m-p/443736#M1162962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13510038132014477" jivemacro_uid="_13510038132014477"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;I am looking for a way to make my script check the data it's trying to load and make sure it has been updated within the last 12 hours or so before continuing.&amp;nbsp; Else I want it to loop and sleep for 10 seconds and then check again until the update has completed.&amp;nbsp; I don't care if it loops indefinitely if the file doesn't update.&amp;nbsp; I will manually stop the looping when I get to work in the morning and check into things if the update doesn't happen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the text I have below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory &lt;A href="https://community.qlik.com/"&gt;\\Busintel\qlikview\Source_Data\&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;do until (NOW()-Filetime(FCDATAQT.TXT))&amp;lt;.6&lt;/P&gt;&lt;P&gt;Test:&lt;/P&gt;&lt;P&gt; First 5&lt;/P&gt;&lt;P&gt; LOAD @2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; NOW()-Filetime() as TestTime&lt;/P&gt;&lt;P&gt; FROM&lt;/P&gt;&lt;P&gt; &lt;A href="https://community.qlik.com/"&gt;\\Busintel\qlikview\Source_Data\FCDATAQT.TXT&lt;/A&gt;&lt;/P&gt;&lt;P&gt; (txt, codepage is 1252, no labels, delimiter is ';', msq)&lt;/P&gt;&lt;P&gt; Where (NOW()-Filetime())&amp;lt;.6;&lt;/P&gt;&lt;P&gt; Sleep(10000); &lt;/P&gt;&lt;P&gt;loop&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I comment the looping structure, the field TestTime = roughly .12 at the moment.&amp;nbsp; The loop continues indefinitely however.&amp;nbsp; What can I do to end the loop if TestTime is less than .6?&amp;nbsp; If I can make that happen, it would solve a great deal of issues for me and free up a lot of my time for more productive tasks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;P&gt;Scott&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 14:57:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-delay-script-load-until-data-file-has-been-updated/m-p/443736#M1162962</guid>
      <dc:creator />
      <dc:date>2012-10-23T14:57:29Z</dc:date>
    </item>
  </channel>
</rss>

