<?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: Change of variable value - Source file unavailable - Reload Fails in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1885841#M72964</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;you can take two approaches:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;before the reload ,&amp;nbsp; use this call&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;set errormode=0;​&lt;/LI-CODE&gt;this setting, basically tells the qlik engine to disregard any error and continue&lt;BR /&gt;so after this part, I'll recommend returning the variable to the default value.&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;set errormode=1;​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Change the date, so if you move the date 2 days back using this expression&amp;nbsp;&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt; LET FileNameC4000 = 'C4000_WK'&amp;amp; num(Week(Today ()-2), '00') &amp;amp;'.xlsx';​&lt;/LI-CODE&gt;using this expression the week number will change only on Monday&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Thu, 27 Jan 2022 07:17:53 GMT</pubDate>
    <dc:creator>lironbaram</dc:creator>
    <dc:date>2022-01-27T07:17:53Z</dc:date>
    <item>
      <title>Change of variable value - Source file unavailable - Reload Fails</title>
      <link>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1885758#M72963</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I have this variable in my script - LET FileNameC4000 = 'C4000_WK'&amp;amp; num(Week(Today ()), '00') &amp;amp;'.xlsx';&lt;BR /&gt;The result of the variable is C4000_WK04.xlsx&lt;/P&gt;
&lt;P&gt;And this variable get fed into the load script as below.&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;FieldA&lt;BR /&gt;FieldB&lt;BR /&gt;FROM [lib://filepath/$(FileNameC4000)] &lt;BR /&gt;(ooxml, embedded labels, table is $(TabNameC4000))&lt;/P&gt;
&lt;P&gt;The source file is available at the file path as C4000_WK04.xlsx&lt;/P&gt;
&lt;P&gt;Now, after Saturday the variable value changes to C4000_WK05.xlsx because of the 5'th week.&lt;BR /&gt;The file gets uploaded only on Monday, so since then the reload of this script fails due to the file not found error because it looks for&amp;nbsp;C4000_WK05.xlsx&lt;/P&gt;
&lt;P&gt;Can some one please advice on how to mitigate this error? I think to exit the script gracefully if the file is not yet available for the 5'th week but how to accomplish it?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 02:05:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1885758#M72963</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2022-01-27T02:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change of variable value - Source file unavailable - Reload Fails</title>
      <link>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1885841#M72964</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;you can take two approaches:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;before the reload ,&amp;nbsp; use this call&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;set errormode=0;​&lt;/LI-CODE&gt;this setting, basically tells the qlik engine to disregard any error and continue&lt;BR /&gt;so after this part, I'll recommend returning the variable to the default value.&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;set errormode=1;​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Change the date, so if you move the date 2 days back using this expression&amp;nbsp;&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt; LET FileNameC4000 = 'C4000_WK'&amp;amp; num(Week(Today ()-2), '00') &amp;amp;'.xlsx';​&lt;/LI-CODE&gt;using this expression the week number will change only on Monday&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 27 Jan 2022 07:17:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1885841#M72964</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2022-01-27T07:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Change of variable value - Source file unavailable - Reload Fails</title>
      <link>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1885924#M72970</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;You can try like below&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Let vWeekDay = WeekDay(Today(1));&lt;/P&gt;
&lt;P&gt;If vWeekDay = 'Sat' or&amp;nbsp; vWeekDay = 'Sun' then&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LET FileNameC4000 = 'C4000_WK'&amp;amp; num(Week(Today (1)-2), '00') &amp;amp;'.xlsx';&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Else&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LET FileNameC4000 = 'C4000_WK'&amp;amp; num(Week(Today (1)), '00') &amp;amp;'.xlsx';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;End If&lt;/P&gt;
&lt;P&gt;LOAD&lt;/P&gt;
&lt;P&gt;FieldA&lt;BR /&gt;FieldB&lt;BR /&gt;FROM [lib://filepath/$(FileNameC4000)]&lt;BR /&gt;(ooxml, embedded labels, table is $(TabNameC4000));&lt;/P&gt;
&lt;P&gt;So that, it won't throw error on Sat n Sun, it will fetch last week file&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 10:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1885924#M72970</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2022-01-27T10:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Change of variable value - Source file unavailable - Reload Fails</title>
      <link>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1886235#M72999</link>
      <description>&lt;P&gt;Thank you so much!!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 18:52:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1886235#M72999</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2022-01-27T18:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change of variable value - Source file unavailable - Reload Fails</title>
      <link>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1886236#M73000</link>
      <description>&lt;P&gt;Thank you so much Mayil&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jan 2022 18:52:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Change-of-variable-value-Source-file-unavailable-Reload-Fails/m-p/1886236#M73000</guid>
      <dc:creator>jpjust</dc:creator>
      <dc:date>2022-01-27T18:52:31Z</dc:date>
    </item>
  </channel>
</rss>

