<?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: Need your help to Automate this script to Reload data based on user request in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863575#M302286</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I did not get it. What it is going to make difference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When initial load and publish I am doing it should load only 6 months data means should execute this block:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;ELSE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FACT_DATA_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;//Load 6 months Data bydefault&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT FACT_DATA&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE _DateKey&amp;gt;=20141006;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DROP TABLE FACT_DATA;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and if some user trying to reload from section access then it should execute and reload based on user selection &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Apr 2015 10:42:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-07T10:42:08Z</dc:date>
    <item>
      <title>Need your help to Automate this script to Reload data based on user request</title>
      <link>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863569#M302280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying for below and so written below script. &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;There is variable (vFile) to end users to select the months (12,18 24)&lt;/LI&gt;&lt;LI&gt;Reload Button so that after selecting vFile they should click on Reload button to reload data as they want&lt;/LI&gt;&lt;LI&gt;Below script I have written to avoid 2nd time reload if any user has loaded the data on same day&lt;/LI&gt;&lt;LI&gt;By-default, we load only 6 months data and publish to server&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Please someone can review the script and tell me why IF ELSEIF condition is not working when I try to reload from application end. &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//This is the Script to Generate LOAD_ON_REQUEST_CONFIG_DATA.QVD file&lt;/P&gt;&lt;P&gt;LET vNow=Now();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG_DATA:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RunDateTime, NumberOfMonths, LoadFlag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vNow), 12, 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vNow), 18, 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(vNow), 24, 0&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;STORE LOAD_ON_REQUEST_CONFIG_DATA INTO $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Reload button.PNG" class="jive-image image-1" src="/legacyfs/online/82993_Reload button.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//This File Holds 24 Months of Data into fact table FACT_DATA&lt;/P&gt;&lt;P&gt;BINARY C:\Model_24_MONTHS.qvw;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss TT';&lt;/P&gt;&lt;P&gt;SET DateFormat='YYYY-MM-DD';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='YYYY-MM-DD hh:mm:ss[.fff] TT';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Configuration Table. LoadFlag 1 means data loaded and 0 means not loaded&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; RunDateTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp; NumberOfMonths,&lt;/P&gt;&lt;P&gt;&amp;nbsp; LoadFlag&lt;/P&gt;&lt;P&gt;FROM $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// $(vFile) is Input Variable &lt;/P&gt;&lt;P&gt;//Load 12 months data on request (When user select $(vFile)=12 and click on Reload)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;IF $(vFile)=12 AND NumberOfMonths=12 AND LoadFlag=0 THEN&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG_DATA:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; RunDateTime, &lt;/P&gt;&lt;P&gt;&amp;nbsp; NumberOfMonths,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF (NumberOfMonths=12 AND LoadFlag=0,1,LoadFlag) AS LoadFlag&lt;/P&gt;&lt;P&gt;RESIDENT LOAD_ON_REQUEST_CONFIG;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE LOAD_ON_REQUEST_CONFIG_DATA INTO $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT_DATA_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT FACT_DATA&lt;/P&gt;&lt;P&gt;WHERE _DateKey&amp;gt;=20140407;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE FACT_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load 18 months data on request (When user select $(vFile)=18 and click on Reload)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;ELSEIF $(vFile)=18 AND NumberOfMonths=18 AND LoadFlag=0 THEN&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG_DATA:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; RunDateTime, &lt;/P&gt;&lt;P&gt;&amp;nbsp; NumberOfMonths,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF ((NumberOfMonths=12 OR NumberOfMonths=18) AND LoadFlag=0,1,LoadFlag) AS LoadFlag&lt;/P&gt;&lt;P&gt;RESIDENT LOAD_ON_REQUEST_CONFIG;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE LOAD_ON_REQUEST_CONFIG_DATA INTO $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT_DATA_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT FACT_DATA&lt;/P&gt;&lt;P&gt;WHERE _DateKey&amp;gt;=20131006;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE FACT_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load 24 months data on request (When user select $(vFile)=24 and click on Reload)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ELSEIF $(vFile)=24 AND NumberOfMonths=24 AND LoadFlag=0 THEN&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG_DATA:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; RunDateTime, &lt;/P&gt;&lt;P&gt;&amp;nbsp; NumberOfMonths,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF ((NumberOfMonths=12 OR NumberOfMonths=18 OR NumberOfMonths=24) AND LoadFlag=0,1,LoadFlag) AS LoadFlag&lt;/P&gt;&lt;P&gt;RESIDENT LOAD_ON_REQUEST_CONFIG;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE LOAD_ON_REQUEST_CONFIG_DATA INTO $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT_DATA_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT FACT_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE FACT_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF ($(vFile)=12 OR $(vFile)=18 OR $(vFile)=24) AND LoadFlag=1 THEN&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;MsgBox ($(vFile)&amp;amp;' Months Data has been already loaded by other user and available for all') autogenerate 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSE &lt;/P&gt;&lt;P&gt;FACT_DATA_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load 6 months Data bydefault &lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT FACT_DATA&lt;/P&gt;&lt;P&gt;WHERE _DateKey&amp;gt;=20141006;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE FACT_DATA;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 06:12:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863569#M302280</guid>
      <dc:creator />
      <dc:date>2015-04-07T06:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need your help to Automate this script to Reload data based on user request</title>
      <link>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863570#M302281</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;You have to "extract" values from table to variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let v&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;NumberOfMonths&lt;/STRONG&gt;&lt;/EM&gt;=Peek('&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;NumberOfMonths&lt;/STRONG&gt;&lt;/EM&gt;',0,'&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LOAD_ON_REQUEST_CONFIG&lt;/SPAN&gt;');&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Let v&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LoadFlag&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;=Peek('&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;LoadFlag&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;',0,'&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LOAD_ON_REQUEST_CONFIG&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;and then you can use them without $()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;if &lt;SPAN style="font-size: 13.3333330154419px;"&gt;v&lt;/SPAN&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;NumberOfMonths=24 and ...&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Sergey.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 06:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863570#M302281</guid>
      <dc:creator>pokassov</dc:creator>
      <dc:date>2015-04-07T06:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need your help to Automate this script to Reload data based on user request</title>
      <link>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863571#M302282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sergey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you suggested, I have corrected it and now it is working but I am facing couple of issues:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;When Initially I reload, I want to reload 6 months data but in below script it is executing block IF $(vFile)=12 AND v12NumberOfMonths=12 AND v12LoadFlag=0 THEN. I was expecting to execute ELSE condition. The reason it is executing 1st block because $(vFile) default value is coming as 12. &lt;/LI&gt;&lt;LI&gt;How can I remove default value of Input variable $(vFile)? This variable is defined as predefined value which is having 3 values 12, 18 and 24. Default it is showing 12.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly Help it in resolving it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//This File Holds 24 Months of Data into fact table FACT_DATA&lt;/P&gt;&lt;P&gt;BINARY C:\Model_24_MONTHS.qvw;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=',';&lt;/P&gt;&lt;P&gt;SET DecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='$#,##0.00;($#,##0.00)';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss TT';&lt;/P&gt;&lt;P&gt;SET DateFormat='YYYY-MM-DD';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='YYYY-MM-DD hh:mm:ss[.fff] TT';&lt;/P&gt;&lt;P&gt;SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';&lt;/P&gt;&lt;P&gt;SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Configuration Table. LoadFlag 1 means data loaded and 0 means not loaded&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG_12:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;FROM $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD (qvd)&lt;/P&gt;&lt;P&gt;WHERE NumberOfMonths=12;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET v12NumberOfMonths=PEEK('NumberOfMonths',0,'LOAD_ON_REQUEST_CONFIG_12');&lt;/P&gt;&lt;P&gt;LET v12LoadFlag=PEEK('LoadFlag',0,'LOAD_ON_REQUEST_CONFIG_12');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG_12;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG_18:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;FROM $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD (qvd)&lt;/P&gt;&lt;P&gt;WHERE NumberOfMonths=18;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET v18NumberOfMonths=PEEK('NumberOfMonths',0,'LOAD_ON_REQUEST_CONFIG_18');&lt;/P&gt;&lt;P&gt;LET v18LoadFlag=PEEK('LoadFlag',0,'LOAD_ON_REQUEST_CONFIG_18');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG_18;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG_24:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;FROM $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD (qvd)&lt;/P&gt;&lt;P&gt;WHERE NumberOfMonths=24;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET v24NumberOfMonths=PEEK('NumberOfMonths',0,'LOAD_ON_REQUEST_CONFIG_24');&lt;/P&gt;&lt;P&gt;LET v24LoadFlag=PEEK('LoadFlag',0,'LOAD_ON_REQUEST_CONFIG_24');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG_24;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// $(vFile) is Input Variable&lt;/P&gt;&lt;P&gt;//Load 12 months data on request (When user select $(vFile)=12 and click on Reload)&lt;/P&gt;&lt;P&gt;IF $(vFile)=12 AND v12NumberOfMonths=12 AND v12LoadFlag=0 THEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG_DATA:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; RunDateTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp; NumberOfMonths,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF (NumberOfMonths=12 AND LoadFlag=0,1,LoadFlag) AS LoadFlag&lt;/P&gt;&lt;P&gt;RESIDENT LOAD_ON_REQUEST_CONFIG;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE LOAD_ON_REQUEST_CONFIG_DATA INTO $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT_DATA_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT FACT_DATA&lt;/P&gt;&lt;P&gt;WHERE _DateKey&amp;gt;=20140407;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE FACT_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load 18 months data on request (When user select $(vFile)=18 and click on Reload)&lt;/P&gt;&lt;P&gt;ELSEIF $(vFile)=18 AND v12NumberOfMonths=18 AND v12LoadFlag=0 THEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG_DATA:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; RunDateTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp; NumberOfMonths,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF ((NumberOfMonths=12 OR NumberOfMonths=18) AND LoadFlag=0,1,LoadFlag) AS LoadFlag&lt;/P&gt;&lt;P&gt;RESIDENT LOAD_ON_REQUEST_CONFIG;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE LOAD_ON_REQUEST_CONFIG_DATA INTO $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT_DATA_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT FACT_DATA&lt;/P&gt;&lt;P&gt;WHERE _DateKey&amp;gt;=20131006;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE FACT_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load 24 months data on request (When user select $(vFile)=24 and click on Reload)&lt;/P&gt;&lt;P&gt;ELSEIF $(vFile)=24 AND v12NumberOfMonths=24 AND v12LoadFlag=0 THEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD_ON_REQUEST_CONFIG_DATA:&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; RunDateTime,&lt;/P&gt;&lt;P&gt;&amp;nbsp; NumberOfMonths,&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF ((NumberOfMonths=12 OR NumberOfMonths=18 OR NumberOfMonths=24) AND LoadFlag=0,1,LoadFlag) AS LoadFlag&lt;/P&gt;&lt;P&gt;RESIDENT LOAD_ON_REQUEST_CONFIG;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE LOAD_ON_REQUEST_CONFIG_DATA INTO $(vFactQVDStoragePath)\LOAD_ON_REQUEST_CONFIG_DATA.QVD;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT_DATA_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT FACT_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE FACT_DATA;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ELSEIF ($(vFile)=12 AND v12LoadFlag=1) OR ($(vFile)=18 AND v18LoadFlag=1) OR ($(vFile)=24 AND v24LoadFlag=1)&amp;nbsp; THEN&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;MsgBox ($(vFile)&amp;amp;' Months Data has been already loaded by other user and available for all') autogenerate 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;ELSE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FACT_DATA_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Load 6 months Data bydefault&lt;/P&gt;&lt;P&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P&gt;RESIDENT FACT_DATA&lt;/P&gt;&lt;P&gt;WHERE _DateKey&amp;gt;=20141006;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE FACT_DATA;&lt;/P&gt;&lt;P&gt;&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;&lt;/P&gt;&lt;P&gt;DROP TABLE LOAD_ON_REQUEST_CONFIG;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 09:19:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863571#M302282</guid>
      <dc:creator />
      <dc:date>2015-04-07T09:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need your help to Automate this script to Reload data based on user request</title>
      <link>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863572#M302283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I fink you have to do the same thing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;IF &lt;STRONG&gt;vFile=12&lt;/STRONG&gt; AND v12NumberOfMonths=12 AND v12LoadFlag=0 THEN&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 09:23:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863572#M302283</guid>
      <dc:creator>pokassov</dc:creator>
      <dc:date>2015-04-07T09:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need your help to Automate this script to Reload data based on user request</title>
      <link>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863573#M302284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same result. It is executing the block &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;IF &lt;/SPAN&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vFile=12&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; AND v12NumberOfMonths=12 AND v12LoadFlag=0 THEN&lt;/SPAN&gt; 1st&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 10:15:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863573#M302284</guid>
      <dc:creator />
      <dc:date>2015-04-07T10:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need your help to Automate this script to Reload data based on user request</title>
      <link>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863574#M302285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. I got it.&lt;/P&gt;&lt;P&gt;You can use another variable. For example vUserReload&lt;/P&gt;&lt;P&gt;Add 2 actions before reload and after reload&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="83024" alt="11.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/83024_11.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in your script you can write these lines before using vFile in conditions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If vUserReload=0 then&lt;/P&gt;&lt;P&gt;Set vFile=24;&lt;/P&gt;&lt;P&gt;end if;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 10:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863574#M302285</guid>
      <dc:creator>pokassov</dc:creator>
      <dc:date>2015-04-07T10:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need your help to Automate this script to Reload data based on user request</title>
      <link>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863575#M302286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I did not get it. What it is going to make difference?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When initial load and publish I am doing it should load only 6 months data means should execute this block:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; text-decoration: underline;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;ELSE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FACT_DATA_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;//Load 6 months Data bydefault&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;NOCONCATENATE LOAD *&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;RESIDENT FACT_DATA&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE _DateKey&amp;gt;=20141006;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;DROP TABLE FACT_DATA;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and if some user trying to reload from section access then it should execute and reload based on user selection &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 10:42:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863575#M302286</guid>
      <dc:creator />
      <dc:date>2015-04-07T10:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need your help to Automate this script to Reload data based on user request</title>
      <link>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863576#M302287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry, It's my mistake.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If vUserReload=0 then&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Set vFile=40; //any numbers except 12, 18, 24&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;end if;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Apr 2015 11:04:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-your-help-to-Automate-this-script-to-Reload-data-based-on/m-p/863576#M302287</guid>
      <dc:creator>pokassov</dc:creator>
      <dc:date>2015-04-07T11:04:20Z</dc:date>
    </item>
  </channel>
</rss>

