<?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: QlikSense | Sharepoint | Loop through Subdirectories with ListFolders in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490386#M14274</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, I worked that out shortly after. I didnt realise it stored it in the data model when I was creating it, so that's sorted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks for your response&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 01 Nov 2024 16:22:33 GMT</pubDate>
    <dc:creator>Oggy172</dc:creator>
    <dc:date>2024-11-01T16:22:33Z</dc:date>
    <item>
      <title>QlikSense | Sharepoint | Loop through Subdirectories with ListFolders</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490201#M14266</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New to Qlik (8 days!) and trying to work out a few things.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our datastore is sitting on a Sharepoint, and I've created the web connector fine.&lt;/P&gt;
&lt;P&gt;I then needed to loop through a folder on the Sharepoint and pull in all .xlsx files in a specific folder. I managed to do this with the below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'Office_365_Sharepoint_Metadata - a@b.com';

LOAD Name as [ListFiles.Name] WHERE WildMatch(Name,'*Shift - *');

SELECT Name
FROM ListFiles
WITH PROPERTIES (
subSite='sites/User/',
folder='/sites/User/Shared Documents/User/Development/Labour Files/SiteName/Qlik Registers',
maxResults=''
);

for each vRemoteFile in FieldValueList('ListFiles.Name')

_DirectHours:
LOAD Line as OrigLine,
applymap('WHLINES',upper(Line), 'Unknown') as Line,
floor(num(date#(mid(filename(),11,10),'DD-MM-YYYY'))) as Date,
     upper(Name) as Name, 
     Upper(Job) as Job,
     if(upper(Name)='AGENCY','Agency','Direct') as Type, 
     Hours,
     'SiteName' as Site,
     filename() as Origin,
     left(filename(),1) as Shift, 
    [Std Role]
FROM [lib://QVD Data:Office_365_Sharepoint - a@b.com/Shared Documents/QlikSaaS/Development/Labour Files/SiteName/Qlik Registers/$(vRemoteFile)]
(ooxml, embedded labels, table is Sheet1)
where not isnull([Std Role]) and Hours&amp;gt;0 ;
Next vRemoteFile&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, this works fine, but I need to adjust to also factor in subdirectories.&lt;/P&gt;
&lt;P&gt;eg:&lt;/P&gt;
&lt;P&gt;.../SiteName/Qlik Registers/$(vRemoteFolder)/$v(RemoteSubFolder)/$v(RemoteFile)&lt;/P&gt;
&lt;P&gt;Can someone shed some light on how I can do a loop of two ListFolders commands ??&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 15:36:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490201#M14266</guid>
      <dc:creator>Oggy172</dc:creator>
      <dc:date>2024-10-31T15:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense | Sharepoint | Loop through Subdirectories with ListFolders</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490209#M14267</link>
      <description>&lt;P&gt;&amp;nbsp;believe I have sussed it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;for each vRemoteFolder in FieldValueList('ListFolders.Name')
        
        LOAD Name as [ListFolders.Name1];

        SELECT Name
        FROM ListFolders
        WITH PROPERTIES (
        subSite='/sites/User/',
        folder='/sites/User/Shared Documents/QlikSaaS/Development/Labour Files/SiteName/Qlik Registers/$(vRemoteFolder)',
        maxResults=''
        );
        
        for each vRemoteSubFolder in FieldValueList('ListFolders.Name1')&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 16:01:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490209#M14267</guid>
      <dc:creator>Oggy172</dc:creator>
      <dc:date>2024-10-31T16:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense | Sharepoint | Loop through Subdirectories with ListFolders</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490358#M14269</link>
      <description>&lt;P&gt;Nope, I'm hitting a snag on the reuse of ListFiles.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'Office_365_Sharepoint_Metadata - a@b.com';

LOAD Name as [ListFolders.Name];

SELECT Name
FROM ListFolders
WITH PROPERTIES (
subSite='/sites/User/',
folder='/sites/User/Shared Documents/QlikSaaS/Development/Labour Files/SiteName/Qlik Registers/',
maxResults=''
);

	for each vRemoteFolder in FieldValueList('ListFolders.Name')
        	
	LOAD Name as [ListFolders.Name1];

	SELECT Name
	FROM ListFolders
	WITH PROPERTIES (
	subSite='/sites/User/',
	folder='/sites/User/Shared Documents/QlikSaaS/Development/Labour Files/SiteName/Qlik Registers/$(vRemoteFolder)',
	maxResults=''
	);
        
		for each vRemoteSubFolder in FieldValueList('ListFolders.Name1')

		LOAD Name as [ListFiles.Name] WHERE WildMatch(Name,'*SHIFT REGISTER*');

		SELECT Name
		FROM ListFiles
		WITH PROPERTIES (
		subSite='sites/User/',
		folder='/sites/User/Shared Documents/QlikSaaS/Development/Labour Files/SiteName/Qlik Registers/$(vRemoteFolder)/$(vRemoteSubFolder)',
		maxResults=''
		);

			for each vRemoteFile in FieldValueList('ListFiles.Name')

			_DirectHours:
			LOAD Name, 
     		Upper(Job) as Job, 
     		Grade,
     		applymap('WHLINES',upper(Line), 'Unknown') as Line,
     		Line as OrigLine, 
     		Hours, 
     		Reason,
		     if(match(Grade,'Active'or 'active','Agency'),'Agency','Direct') as Type, 
    		// if(Grade='Agency','Agency','Direct') as Type,
      		ApplyMap('ShiftConv',upper(mid(filename(),18,8))) as Date,
     		left(filename(),1) as Shift,
     		'SiteName' as Site,
     		filename() as Origin 
			FROM [lib://QVD Data:Office_365_Sharepoint - a@b.com/Shared Documents/QlikSaaS/Development/Labour Files/SiteName/Qlik Registers/$(vRemoteFolder)/$(vRemoteSubFolder)/$(vRemoteFile)]
			(biff, embedded labels, header is 2 lines, table is [Register$])
			where not isnull(Name) and not match(Reason,'Absent','Sick','L.O.A.','Holiday') and not match(Grade,'UCS') ;

			LOAD Name1 as Name, 
     		Upper(Job1) as Job, 
     		Grade1 as Grade,
     		applymap('WHLINES',upper(Line1), 'Unknown') as Line,
     		Line1 as OrigLine,   
     		Hours2 as Hours, 
     		Reason1 as Reason,
     		if(match(Grade1,'Active','Agency'),'Agency','Direct') as Type,
     		ApplyMap('ShiftConv',upper(mid(filename(),18,8))) as Date,
     		left(filename(),1) as Shift,
     		'SiteName' as Site,
		     filename() as Origin   
			FROM [lib://QVD Data:Office_365_Sharepoint - a@b.com/Shared Documents/QlikSaaS/Development/Labour Files/SiteName/Qlik Registers/$(vRemoteFolder)/$(vRemoteSubFolder)/$(vRemoteFile)]
			(biff, embedded labels, header is 2 lines, table is [Register$])
			where not isnull(Name1) and not match(Reason1,'Absent','Sick','L.O.A.','Holiday') and not match(Grade1,'UCS');

			Next vRemoteFile
            
		Next vRemoteSubFolder

//	Next vRemoteFolder&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stepping through the code, it works fine for the first iteration of ListFiles, and when it hits &lt;FONT color="#0000FF"&gt;Next&lt;/FONT&gt; &lt;FONT color="#CC99FF"&gt;vRemoteSubFolder&amp;nbsp;&lt;FONT color="#000000"&gt;- it loads in the next subdirectory as expected.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This then loops back to&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD Name as [ListFiles.Name] WHERE WildMatch(Name,'*SHIFT REGISTER*');

		SELECT Name
		FROM ListFiles
		WITH PROPERTIES (
		subSite='sites/User/',
		folder='/sites/User/Shared Documents/QlikSaaS/Development/Labour Files/SiteName/Qlik Registers/$(vRemoteFolder)/$(vRemoteSubFolder)',
		maxResults=''
		);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However the vRemoteFile remains the same and is not 'calculated' from the new vRemoteSubDirectory.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 14:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490358#M14269</guid>
      <dc:creator>Oggy172</dc:creator>
      <dc:date>2024-11-01T14:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense | Sharepoint | Loop through Subdirectories with ListFolders</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490382#M14272</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/318663"&gt;@Oggy172&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because you do not drop when switching to the next Subfolder&lt;/P&gt;
&lt;P&gt;The ListFiles load data will concatenate to the first loaded set.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Give this a name by place &lt;STRONG&gt;ListFiles:&lt;/STRONG&gt; before LOAD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ListFiles: LOAD Name as [ListFiles.Name] WHERE WildMatch(Name,'*SHIFT REGISTER*');

		SELECT Name
		FROM ListFiles
		WITH PROPERTIES (
		subSite='sites/User/',
		folder='/sites/User/Shared Documents/QlikSaaS/Development/Labour Files/SiteName/Qlik Registers/$(vRemoteFolder)/$(vRemoteSubFolder)',
		maxResults=''
		);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then DROP TABLE ListFiles; after Next vRemoteFile.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;			Next vRemoteFile
			DROP TABLE ListFiles;
		Next vRemoteSubFolder&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Oh and the same goes for&amp;nbsp;ListFolders&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 16:12:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490382#M14272</guid>
      <dc:creator>p_verkooijen</dc:creator>
      <dc:date>2024-11-01T16:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense | Sharepoint | Loop through Subdirectories with ListFolders</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490386#M14274</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, I worked that out shortly after. I didnt realise it stored it in the data model when I was creating it, so that's sorted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks for your response&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 16:22:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490386#M14274</guid>
      <dc:creator>Oggy172</dc:creator>
      <dc:date>2024-11-01T16:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense | Sharepoint | Loop through Subdirectories with ListFolders</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490389#M14275</link>
      <description>&lt;P&gt;One last one, I am trying to exclude something from the ListFolders results&lt;/P&gt;
&lt;P&gt;This doesnt seem to work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SELECT Name
FROM ListFolders
WITH PROPERTIES (
subSite='/sites/User/',
folder='/sites/User/Shared Documents/QlikSaaS/Development/Labour Files/SiteName/Qlik Registers/',
maxResults='',
Name='P*');&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but this pulls through a folder called AMB (Which I want to exclude)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or can I use&lt;/P&gt;
&lt;P&gt;=if([ListFolders.Name] = 'AMB' , Do nothing, &amp;lt;rest of code&amp;gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 16:49:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490389#M14275</guid>
      <dc:creator>Oggy172</dc:creator>
      <dc:date>2024-11-01T16:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: QlikSense | Sharepoint | Loop through Subdirectories with ListFolders</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490633#M14281</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28986"&gt;@p_verkooijen&lt;/a&gt;&amp;nbsp;I am having strange behaviour in my loop if you could advise? I hope I can explain it well enough.&lt;/P&gt;
&lt;P&gt;To explain the sharepoint folder structure - we have&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...../Labour Files/Site/Qlik Registers/Period/&lt;/P&gt;
&lt;P&gt;/A Shift/*&lt;BR /&gt;/B Shift/*&lt;BR /&gt;/C Shift/*&lt;/P&gt;
&lt;P&gt;In each shift level folder, there are .xlsx's with the shift register.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use ListFolders to loop through the&amp;nbsp;&lt;STRONG&gt;Qlik Registers&lt;/STRONG&gt; directory and get the&amp;nbsp;&lt;STRONG&gt;Period &lt;/STRONG&gt;(&lt;FONT color="#FF00FF"&gt;vRemoteFolder&lt;/FONT&gt;)&lt;/P&gt;
&lt;P&gt;Then I loop through /&lt;STRONG&gt;$Period&lt;/STRONG&gt;/ and utilise ListFolders to get the shift (A, B, C)&amp;nbsp;(&lt;FONT color="#FF00FF"&gt;vRemoteSubFolder&lt;/FONT&gt;)&lt;/P&gt;
&lt;P&gt;Then use ListFiles on this to get the filenames to parse...&amp;nbsp;(&lt;FONT color="#FF00FF"&gt;vRemoteFile&lt;/FONT&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, the folders exist for months that have not happened yet, this is fine, I disable the errormode and then reset it - but something strange happens. Our Fiscal year is Jul-Jun, and so&lt;/P&gt;
&lt;P&gt;P1 - Jul&lt;/P&gt;
&lt;P&gt;P2 - Aug&lt;/P&gt;
&lt;P&gt;P3 - Sep&lt;/P&gt;
&lt;P&gt;P4 - Oct&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P5 - Nov&lt;/P&gt;
&lt;P&gt;are populated in some capacity&lt;/P&gt;
&lt;P&gt;P6 through to P11 are empty folders&lt;/P&gt;
&lt;P&gt;P12 has some files (with no data, but theyre synced from somewhere else)&lt;/P&gt;
&lt;P&gt;The run order in Qlik is: P4, P1, P9, P6, P11, P8, P12 ......&lt;/P&gt;
&lt;P&gt;P4, P1 parse data as expected and&amp;nbsp;&lt;STRONG&gt;ListFiles&lt;/STRONG&gt; is dropped.&lt;/P&gt;
&lt;P&gt;P9, P6, P11, P8 error but continue due to ErrorMode=0&lt;/P&gt;
&lt;P&gt;When it comes back to a folder with files to parse (P12 - Jun), it does:&lt;/P&gt;
&lt;P&gt;ListFolders - A/B/C Shift - All ok&lt;/P&gt;
&lt;P&gt;ListFiles for B Shift - runs through all files ok&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Drop Table ListFiles;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;- Error Table not Found&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Next vRemoteSubFolder to A Shift, but fails as vRemoteFile hasnt looped.&lt;/P&gt;
&lt;P&gt;When I check the Data Model, ListFiles exists in the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'Office_365_Sharepoint_Metadata - a@b.com';

LOAD Name as [ListFolders.Name];

SELECT Name
FROM ListFolders
WITH PROPERTIES (
subSite='/sites/User/',
folder='/sites/User/Shared Documents/QlikSaaS/Development/Labour Files/Site/Qlik Registers/',
maxResults=''
);


qualify *;

TempTable:
load ListFolders.Name as Name
resident PackingAsset
where ListFolders.Name &amp;lt;&amp;gt; 'AMB';

unqualify *;

	for each vRemoteFolder in FieldValueList('TempTable.Name')
 // if('ListFolders.Name'='AMB'
	LOAD Name as [ListFolders.Name1];

	SELECT Name
	FROM ListFolders
	WITH PROPERTIES (
	subSite='/sites/User/',
	folder='/sites/User/Shared Documents/QlikSaaS/Development/Labour Files/Site/Qlik Registers/$(vRemoteFolder)',
	maxResults=''
	);
        
		for each vRemoteSubFolder in FieldValueList('ListFolders.Name1')
        
   //     LOAD Name as [ListFiles.Name] WHERE 1=2;

		SET ErrorMode=0;
		LOAD Name as [ListFiles.Name] WHERE WildMatch(Name,'*SHIFT REGISTER*');
    

		SELECT Name
		FROM ListFiles
		WITH PROPERTIES (
		subSite='sites/User/',
		folder='/sites/User/Shared Documents/QlikSaaS/Development/Labour Files/Site/Qlik Registers/$(vRemoteFolder)/$(vRemoteSubFolder)',
		maxResults=''
		);

			for each vRemoteFile in FieldValueList('ListFiles.Name')
			_DirectHours:
			LOAD Name, 
     		Upper(Job) as Job, 
     		Grade,
     		applymap('WHLINES',upper(Line), 'Unknown') as Line,
     		Line as OrigLine, 
     		Hours, 
     		Reason,
		     if(match(Grade,'Active'or 'active','Agency'),'Agency','Direct') as Type, 
    		// if(Grade='Agency','Agency','Direct') as Type,
      		ApplyMap('ShiftConv',upper(mid(filename(),18,8))) as Date,
     		left(filename(),1) as Shift,
     		'Site' as Site,
     		filename() as Origin 
			FROM [lib://QVD Data:Office_365_Sharepoint - a@b.com/Shared Documents/QlikSaaS/Development/Labour Files/Site/Qlik Registers/$(vRemoteFolder)/$(vRemoteSubFolder)/$(vRemoteFile)]
			(biff, embedded labels, header is 2 lines, table is [Register$])
			where not isnull(Name) and not match(Reason,'Absent','Sick','L.O.A.','Holiday') and not match(Grade,'UCS') ;

			LOAD Name1 as Name, 
     		Upper(Job1) as Job, 
     		Grade1 as Grade,
     		applymap('WHLINES',upper(Line1), 'Unknown') as Line,
     		Line1 as OrigLine,   
     		Hours2 as Hours, 
     		Reason1 as Reason,
     		if(match(Grade1,'Active','Agency'),'Agency','Direct') as Type,
     		ApplyMap('ShiftConv',upper(mid(filename(),18,8))) as Date,
     		left(filename(),1) as Shift,
     		'Site' as Site,
		     filename() as Origin   
			FROM [lib://QVD Data:Office_365_Sharepoint - a@b.com/Shared Documents/QlikSaaS/Development/Labour Files/Site/Qlik Registers/$(vRemoteFolder)/$(vRemoteSubFolder)/$(vRemoteFile)]
			(biff, embedded labels, header is 2 lines, table is [Register$])
			where not isnull(Name1) and not match(Reason1,'Absent','Sick','L.O.A.','Holiday') and not match(Grade1,'UCS');
			Next vRemoteFile


         DROP TABLE ListFiles;
            
		Next vRemoteSubFolder
 		

	set errormode=1;
	Next vRemoteFolder
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 16:40:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/QlikSense-Sharepoint-Loop-through-Subdirectories-with/m-p/2490633#M14281</guid>
      <dc:creator>Oggy172</dc:creator>
      <dc:date>2024-11-04T16:40:29Z</dc:date>
    </item>
  </channel>
</rss>

