<?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: Loading the file, if exists, by using variables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Loading-the-file-if-exists-by-using-variables/m-p/2116795#M91124</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can use the following expression to check if the file exists:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Let vFileExsist &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Num&lt;/SPAN&gt;&lt;SPAN&gt;(-(&lt;/SPAN&gt;&lt;SPAN&gt;not&lt;/SPAN&gt; &lt;SPAN&gt;isnull&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;QVDCreateTime&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'$(vFileName)'&lt;/SPAN&gt;&lt;SPAN&gt;))))&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 14 Sep 2023 06:33:23 GMT</pubDate>
    <dc:creator>Cascader</dc:creator>
    <dc:date>2023-09-14T06:33:23Z</dc:date>
    <item>
      <title>Loading the file, if exists, by using variables</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-the-file-if-exists-by-using-variables/m-p/2116455#M91103</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to create a script that loads xlsx file each day if the file exists. If not, just skip for that date.&lt;/P&gt;
&lt;P&gt;I get an error message on vFileExsist variable (see below). I assume that an issue is because I am trying to load from lib: which is not the correct path for this case.&lt;/P&gt;
&lt;P&gt;SET vFileName='lib://Geo/SPGI_$(vToday).xlsx';&lt;/P&gt;
&lt;P&gt;Let vFileExsist=if(FileSize($(vFileName))&amp;gt;0,-1,0); // &lt;EM&gt;error (&amp;nbsp;&lt;SPAN&gt;The following error occurred:&lt;/SPAN&gt;&lt;SPAN&gt;Unexpected token: 'Metrics', expected one of: ',', ':', 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', ...&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;if $(vFileExsist) then&lt;/P&gt;
&lt;P&gt;For_Upload:&lt;/P&gt;
&lt;P&gt;NoConcatenate&lt;BR /&gt;LOAD&lt;BR /&gt;PO_ID as PO_ID_FOR_UPDATE,&lt;BR /&gt;FINAL_RCA as FINAL_RCA_FOR_UPDATE,&lt;BR /&gt;"Comment"&lt;BR /&gt;FROM [lib://Geo/SPGI_$(vToday).xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is in)&lt;/P&gt;
&lt;P&gt;where isnull(FINAL_RCA)&amp;lt;&amp;gt;0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance for help.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 11:29:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-the-file-if-exists-by-using-variables/m-p/2116455#M91103</guid>
      <dc:creator>Lazar1</dc:creator>
      <dc:date>2023-09-13T11:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the file, if exists, by using variables</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-the-file-if-exists-by-using-variables/m-p/2116467#M91109</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;You can try:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Let vFileExsist=if(FileSize(&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;'&lt;/FONT&gt;&lt;/STRONG&gt;$(vFileName)&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;'&lt;/FONT&gt;&lt;/STRONG&gt;)&amp;gt;0,-1,0);&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2023 11:45:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-the-file-if-exists-by-using-variables/m-p/2116467#M91109</guid>
      <dc:creator>Aurelien_Martinez</dc:creator>
      <dc:date>2023-09-13T11:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the file, if exists, by using variables</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-the-file-if-exists-by-using-variables/m-p/2116795#M91124</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can use the following expression to check if the file exists:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Let vFileExsist &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;Num&lt;/SPAN&gt;&lt;SPAN&gt;(-(&lt;/SPAN&gt;&lt;SPAN&gt;not&lt;/SPAN&gt; &lt;SPAN&gt;isnull&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;QVDCreateTime&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'$(vFileName)'&lt;/SPAN&gt;&lt;SPAN&gt;))))&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Sep 2023 06:33:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-the-file-if-exists-by-using-variables/m-p/2116795#M91124</guid>
      <dc:creator>Cascader</dc:creator>
      <dc:date>2023-09-14T06:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Loading the file, if exists, by using variables</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-the-file-if-exists-by-using-variables/m-p/2116823#M91125</link>
      <description>&lt;P&gt;Apparently this worked fine &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2023 07:14:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-the-file-if-exists-by-using-variables/m-p/2116823#M91125</guid>
      <dc:creator>Lazar1</dc:creator>
      <dc:date>2023-09-14T07:14:41Z</dc:date>
    </item>
  </channel>
</rss>

