<?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: Loop to load a file every monday in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Loop-to-load-a-file-every-monday/m-p/1583235#M42635</link>
    <description>&lt;P&gt;Hi Mike !&lt;/P&gt;&lt;P&gt;Why don't you use the Qlik Management Console (QMC)? you can add tasks to reload your app every [x] minutes.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
    <pubDate>Wed, 22 May 2019 09:56:47 GMT</pubDate>
    <dc:creator>Nuckpio</dc:creator>
    <dc:date>2019-05-22T09:56:47Z</dc:date>
    <item>
      <title>Loop to load a file every monday</title>
      <link>https://community.qlik.com/t5/App-Development/Loop-to-load-a-file-every-monday/m-p/1583186#M42626</link>
      <description>&lt;P&gt;Hi Guys,&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i have file that is made available to me every monday. From the 2019-01-07&lt;/P&gt;&lt;P&gt;I have set up variables to get the week start and the file path.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But now I need to load and concatenate the data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So week one I have one weeks of data with the date, week two two weeks of data and two dates.&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the script so far&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let vLogStart = now();

WORK_ORDER_FILTER:
LOAD * Inline [Work_Order_Status
Closed
Completed
Not Completed
On Hold
On Hold - Customer Driven
On Hold - Elekta Driven
Open
PM Merged
Processing
Submitted
Superceded
Waiting for Parts
];

CALL TimeLogger('WO Filter'); 

let vLogStart = now();
 
//-------------------------------------------------------------------------

let vWeekStart = date(weekstart(today()), 'YYYY-MM-dd');
let vFilePath = '[lib://CLM Snapshots (Weekly)/REP_Work_Order_' &amp;amp; date(weekstart(today()), 'YYYY-MM-dd') &amp;amp; '.qvd]';

//-------------------------------------------------------------------------

WO:
Load * Inline [
Snapshot_Date,
]
;

Concatenate(WO)
LOAD 
     peek($(vWeekStart)) as Snapshot_Date,
     Work_Order_Owner_Id_Key,
     Work_Order_Name,
     Work_Order_Created_By_Id_Key,
     Work_Order_Status,
     Work_Order_Type,
     Work_Order_Description,
     Work_Order_SFP_Id_Key AS OF_Id_Key_PRO,
     Work_Order_Work_Description,
     DATE(Work_Order_Start_Date,'dd-MMM-yyyy') as Work_Order_Start_Date,
     Work_Order_Account_Id_Key
     FROM $(vFilePath)(qvd)
Where Exists(Work_Order_Status);

CALL TimeLogger('WO'); &lt;/LI-CODE&gt;&lt;P&gt;Any Help is greatly appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 09:10:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loop-to-load-a-file-every-monday/m-p/1583186#M42626</guid>
      <dc:creator>mikegauntlett</dc:creator>
      <dc:date>2019-05-22T09:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: Loop to load a file every monday</title>
      <link>https://community.qlik.com/t5/App-Development/Loop-to-load-a-file-every-monday/m-p/1583235#M42635</link>
      <description>&lt;P&gt;Hi Mike !&lt;/P&gt;&lt;P&gt;Why don't you use the Qlik Management Console (QMC)? you can add tasks to reload your app every [x] minutes.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 09:56:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loop-to-load-a-file-every-monday/m-p/1583235#M42635</guid>
      <dc:creator>Nuckpio</dc:creator>
      <dc:date>2019-05-22T09:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Loop to load a file every monday</title>
      <link>https://community.qlik.com/t5/App-Development/Loop-to-load-a-file-every-monday/m-p/1583816#M42682</link>
      <description>Within the App I need to be able to compare data from one week to other week via the snapshot date.&lt;BR /&gt;&lt;BR /&gt;Also I have no access to the QMC for our company. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Thu, 23 May 2019 09:45:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loop-to-load-a-file-every-monday/m-p/1583816#M42682</guid>
      <dc:creator>mikegauntlett</dc:creator>
      <dc:date>2019-05-23T09:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Loop to load a file every monday</title>
      <link>https://community.qlik.com/t5/App-Development/Loop-to-load-a-file-every-monday/m-p/1583889#M42690</link>
      <description>&lt;P&gt;Current Script&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let vLogStart = now();&lt;/P&gt;&lt;P&gt;WORK_ORDER_FILTER:&lt;BR /&gt;LOAD * Inline [Work_Order_Status&lt;BR /&gt;Closed&lt;BR /&gt;Completed&lt;BR /&gt;Not Completed&lt;BR /&gt;On Hold&lt;BR /&gt;On Hold - Customer Driven&lt;BR /&gt;On Hold - Elekta Driven&lt;BR /&gt;Open&lt;BR /&gt;PM Merged&lt;BR /&gt;Processing&lt;BR /&gt;Submitted&lt;BR /&gt;Superceded&lt;BR /&gt;Waiting for Parts&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;CALL TimeLogger('WO Filter');&lt;/P&gt;&lt;P&gt;let vLogStart = now();&lt;BR /&gt;&lt;BR /&gt;//-------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Set vWeekStart = date(weekstart(today()), 'YYYY-MM-dd');&lt;BR /&gt;let vFilePath = '[lib://CLM Snapshots (Weekly)/REP_Work_Order_' &amp;amp; date(weekstart(today()), 'YYYY-MM-dd') &amp;amp; '.qvd]';&lt;/P&gt;&lt;P&gt;//-------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Set a = date(weekstart(today()), 'YYYY-MM-dd');&lt;/P&gt;&lt;P&gt;Do while a &amp;lt; today();&lt;/P&gt;&lt;P&gt;WO_Temp:&lt;BR /&gt;LOAD&lt;BR /&gt;//peek($(vWeekStart)) as Snapshot_Date,&lt;BR /&gt;Work_Order_Owner_Id_Key,&lt;BR /&gt;Work_Order_Name,&lt;BR /&gt;Work_Order_Created_By_Id_Key,&lt;BR /&gt;Work_Order_Status,&lt;BR /&gt;Work_Order_Type,&lt;BR /&gt;Work_Order_Description,&lt;BR /&gt;Work_Order_SFP_Id_Key AS OF_Id_Key_PRO,&lt;BR /&gt;Work_Order_Work_Description,&lt;BR /&gt;Work_Order_Start_Date as Work_Order_Start_Date0,&lt;BR /&gt;Work_Order_Account_Id_Key&lt;BR /&gt;FROM $(vFilePath)(qvd)&lt;BR /&gt;Where Exists(Work_Order_Status);&lt;/P&gt;&lt;P&gt;WO:&lt;BR /&gt;Load&lt;BR /&gt;*,&lt;BR /&gt;$(vWeekStart) as Snapshot_Date,&lt;BR /&gt;Date(Work_Order_Start_Date0, 'dd-MMM-YYYY') as Work_Order_Start_Date&lt;BR /&gt;Resident WO_Temp;&lt;/P&gt;&lt;P&gt;Drop Table WO_Temp;&lt;/P&gt;&lt;P&gt;Loop&lt;/P&gt;&lt;P&gt;CALL TimeLogger('WO');&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 12:32:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loop-to-load-a-file-every-monday/m-p/1583889#M42690</guid>
      <dc:creator>mikegauntlett</dc:creator>
      <dc:date>2019-05-23T12:32:56Z</dc:date>
    </item>
  </channel>
</rss>

