<?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: How do you check if a file exists in a LIB in load script on Qlik SAAS? in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-do-you-check-if-a-file-exists-in-a-LIB-in-load-script-on/m-p/1917629#M10555</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29267"&gt;@aritting&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, it works on my Qlik Cloud&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik cloud.PNG" style="width: 823px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/76924i09B10DCAE35C0C98/image-dimensions/823x386?v=v2" width="823" height="386" role="button" title="qlik cloud.PNG" alt="qlik cloud.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Apr 2022 18:47:21 GMT</pubDate>
    <dc:creator>joseph_morales</dc:creator>
    <dc:date>2022-04-12T18:47:21Z</dc:date>
    <item>
      <title>How do you check if a file exists in a LIB in load script on Qlik SAAS?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-do-you-check-if-a-file-exists-in-a-LIB-in-load-script-on/m-p/1910890#M10472</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have this QlikView and Qlik Sense Enterprise code that checks for a fieldmap file and remaps column names&lt;/P&gt;
&lt;P&gt;Is there a way to check if a file exists in a lib on Qlik Sense SAAS? using either the datafile lib or an Amazon S3 lib?&lt;/P&gt;
&lt;PRE&gt; call vL.FileExist ('$(vG.ImportPath)\fieldmap-$(vL.TrimmedDocName).csv'); //Validate if cache exist&lt;BR /&gt;if vL.FileExist='true' then &lt;BR /&gt;// Remap the fields with descriptive names&lt;BR /&gt;[FieldMap$(vL.TrimmedDocName)]:&lt;BR /&gt;MAPPING LOAD&lt;BR /&gt;ExistingFieldName, &lt;BR /&gt;UserFriendlyFieldName&lt;BR /&gt;FROM&lt;BR /&gt;[$(vG.ImportPath)\fieldmap-$(vL.TrimmedDocName).csv]&lt;BR /&gt;(txt, codepage is 1252, embedded labels, delimiter is ',', msq)&lt;BR /&gt;WHERE len(UserFriendlyFieldName)&amp;gt;0;&lt;BR /&gt;RENAME FIELDS USING [FieldMap$(vL.TrimmedDocName)];&lt;BR /&gt;endif&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 02:00:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-do-you-check-if-a-file-exists-in-a-LIB-in-load-script-on/m-p/1910890#M10472</guid>
      <dc:creator>aritting</dc:creator>
      <dc:date>2022-03-29T02:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do you check if a file exists in a LIB in load script on Qlik SAAS?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-do-you-check-if-a-file-exists-in-a-LIB-in-load-script-on/m-p/1910900#M10473</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29267"&gt;@aritting&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try with the filezise() function&lt;/P&gt;
&lt;P&gt;Where you can replace the vPath variable with the data connection and vFile with the file inside the data connection&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LET vPath ='lib://Dropbox/Files/';
LET vFileName ='Crostable.xlsx';

If FileSize('$(vPath)$(vFileName)') THEN

TRACE File exists $(vPath)$(vFileName);

Table:
LOAD
    Salesman,
    "Year",
    Jan,
    Feb,
    Mar,
    Apr,
    May,
    Jun
FROM [$(vPath)$(vFileName)]
(ooxml, embedded labels, table is Sheet1);

Else

TRACE File does not exist $(vPath)$(vFileName);

End If&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 03:27:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-do-you-check-if-a-file-exists-in-a-LIB-in-load-script-on/m-p/1910900#M10473</guid>
      <dc:creator>joseph_morales</dc:creator>
      <dc:date>2022-03-29T03:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do you check if a file exists in a LIB in load script on Qlik SAAS?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-do-you-check-if-a-file-exists-in-a-LIB-in-load-script-on/m-p/1912764#M10485</link>
      <description>&lt;P&gt;Does this work in Qlik Cloud?&amp;nbsp; So far in my testing the answer is no.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 20:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-do-you-check-if-a-file-exists-in-a-LIB-in-load-script-on/m-p/1912764#M10485</guid>
      <dc:creator>aritting</dc:creator>
      <dc:date>2022-03-31T20:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do you check if a file exists in a LIB in load script on Qlik SAAS?</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/How-do-you-check-if-a-file-exists-in-a-LIB-in-load-script-on/m-p/1917629#M10555</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/29267"&gt;@aritting&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, it works on my Qlik Cloud&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik cloud.PNG" style="width: 823px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/76924i09B10DCAE35C0C98/image-dimensions/823x386?v=v2" width="823" height="386" role="button" title="qlik cloud.PNG" alt="qlik cloud.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 18:47:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/How-do-you-check-if-a-file-exists-in-a-LIB-in-load-script-on/m-p/1917629#M10555</guid>
      <dc:creator>joseph_morales</dc:creator>
      <dc:date>2022-04-12T18:47:21Z</dc:date>
    </item>
  </channel>
</rss>

