<?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 How to load multiple files from SharePoint using the Office 365 Connector? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-load-multiple-files-from-SharePoint-using-the-Office-365/m-p/1939197#M77418</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I've run into a problem when trying to load multiple files from SharePoint using the Office 365 Connector that comes from the latest Qlik Web Connector. In addition, I watched this video:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=x6OK_2sRxCY" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.youtube.com/watch?v=x6OK_2sRxCY&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For the most part, it does exactly what it says it will do. I can pull in a single file and I confirmed it, but that's all it can do. Obviously, this is incredibly inefficient since there are over hundreds of Excel files in the SharePoint folder I'm trying to pull from.&lt;/P&gt;
&lt;P&gt;I then had a thought in which I use the ListFiles table to get all of the UniqueIds of the Excel files. Then I can create the GetFile connection so I can pull the individual file.&lt;/P&gt;
&lt;P&gt;The question now becomes, how can I dynamically do this so the GetFile connection will grab all files instead of a single file? My thought was to do this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;let vQwcConnectionName = 'lib://SharePoint_Connection_Test';&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;let vgetfileconnection = 'lib://GetExcelFiles';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Office365Connector_ListFiles:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; UniqueId as ListFiles_UniqueId&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FROM [$(vQwcConnectionName)]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;(URL IS [&lt;EM&gt;web connector URL, it tripped the spam filter so removing it&lt;/EM&gt;], qvx);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;for i=0 to NoOfRows('Office365Connector_ListFiles') - 1 &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;let vField = Peek('ListFiles_UniqueId',$(i),'Office365Connector_ListFiles');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; userPrincipalName,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; userDisplayName,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; mfaCapable,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; passwordlessCapable,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; ssprCapable,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; ssprRegistered,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; ssprEnabled,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; methodsRegistered&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FROM [$(vgetfileconnection)$(vField)]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;(txt, utf8, embedded labels, delimiter is ',', msq)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NEXT i&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I'm getting this error:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QlikToFindOut_0-1654201250496.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/80940iC39C30F0417B4082/image-size/medium?v=v2&amp;amp;px=400" role="button" title="QlikToFindOut_0-1654201250496.png" alt="QlikToFindOut_0-1654201250496.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the back end, the connection looks something like this:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;webconnectorurl&lt;/STRONG&gt;?connectorID=Office365Connector&amp;amp;table=GetFile&amp;amp;subSite=sites%2fEnterpriseDataReportingAnalysis%2f&amp;amp;fileId=&lt;/P&gt;
&lt;P&gt;I removed the fieldId at the end so I can just append a value onto it like I have in my for loop up there. Unfortunately, I'm getting that error message above.&lt;/P&gt;
&lt;P&gt;This leads me to ask two questions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Is what I'm doing even possible?&lt;/LI&gt;
&lt;LI&gt;Is there something in the connector itself that allows me to pull multiple files dynamically without constantly needing to go to the web connector to create a new connection?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jun 2022 20:23:44 GMT</pubDate>
    <dc:creator>QlikToFindOut</dc:creator>
    <dc:date>2022-06-02T20:23:44Z</dc:date>
    <item>
      <title>How to load multiple files from SharePoint using the Office 365 Connector?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-load-multiple-files-from-SharePoint-using-the-Office-365/m-p/1939197#M77418</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I've run into a problem when trying to load multiple files from SharePoint using the Office 365 Connector that comes from the latest Qlik Web Connector. In addition, I watched this video:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.youtube.com/watch?v=x6OK_2sRxCY" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.youtube.com/watch?v=x6OK_2sRxCY&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;For the most part, it does exactly what it says it will do. I can pull in a single file and I confirmed it, but that's all it can do. Obviously, this is incredibly inefficient since there are over hundreds of Excel files in the SharePoint folder I'm trying to pull from.&lt;/P&gt;
&lt;P&gt;I then had a thought in which I use the ListFiles table to get all of the UniqueIds of the Excel files. Then I can create the GetFile connection so I can pull the individual file.&lt;/P&gt;
&lt;P&gt;The question now becomes, how can I dynamically do this so the GetFile connection will grab all files instead of a single file? My thought was to do this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;let vQwcConnectionName = 'lib://SharePoint_Connection_Test';&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;let vgetfileconnection = 'lib://GetExcelFiles';&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Office365Connector_ListFiles:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; UniqueId as ListFiles_UniqueId&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FROM [$(vQwcConnectionName)]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;(URL IS [&lt;EM&gt;web connector URL, it tripped the spam filter so removing it&lt;/EM&gt;], qvx);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;for i=0 to NoOfRows('Office365Connector_ListFiles') - 1 &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;let vField = Peek('ListFiles_UniqueId',$(i),'Office365Connector_ListFiles');&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;LOAD&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; userPrincipalName,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; userDisplayName,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; mfaCapable,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; passwordlessCapable,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; ssprCapable,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; ssprRegistered,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; ssprEnabled,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; methodsRegistered&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FROM [$(vgetfileconnection)$(vField)]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;(txt, utf8, embedded labels, delimiter is ',', msq)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;NEXT i&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, I'm getting this error:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QlikToFindOut_0-1654201250496.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/80940iC39C30F0417B4082/image-size/medium?v=v2&amp;amp;px=400" role="button" title="QlikToFindOut_0-1654201250496.png" alt="QlikToFindOut_0-1654201250496.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the back end, the connection looks something like this:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;webconnectorurl&lt;/STRONG&gt;?connectorID=Office365Connector&amp;amp;table=GetFile&amp;amp;subSite=sites%2fEnterpriseDataReportingAnalysis%2f&amp;amp;fileId=&lt;/P&gt;
&lt;P&gt;I removed the fieldId at the end so I can just append a value onto it like I have in my for loop up there. Unfortunately, I'm getting that error message above.&lt;/P&gt;
&lt;P&gt;This leads me to ask two questions:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Is what I'm doing even possible?&lt;/LI&gt;
&lt;LI&gt;Is there something in the connector itself that allows me to pull multiple files dynamically without constantly needing to go to the web connector to create a new connection?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 20:23:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-load-multiple-files-from-SharePoint-using-the-Office-365/m-p/1939197#M77418</guid>
      <dc:creator>QlikToFindOut</dc:creator>
      <dc:date>2022-06-02T20:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to load multiple files from SharePoint using the Office 365 Connector?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-load-multiple-files-from-SharePoint-using-the-Office-365/m-p/1939417#M77437</link>
      <description>&lt;P&gt;I think the loop-approach should be in general possible. But I'm not familiar enough with the lib-connection to say if it would be directly possible with a single-lib and then adding to it all dynamic parts or if each time a new lib would be needed. Further you need to make sure that the created path is complete and valide.&lt;/P&gt;
&lt;P&gt;Therefore I suggest to compare these loop-path with the path which is created to load a single file outside from the loop. Maybe you don't try to load the files immediately in the loop else just writing the path-strings within a variable or a TRACE or a txt to check the logic and syntax without running into a load-error. If you could confirm that the paths are identically and correct and it didn't work you may switch to the legacy mode to exclude that the lib-feature prevents a successful loading.&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2022 12:10:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-load-multiple-files-from-SharePoint-using-the-Office-365/m-p/1939417#M77437</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-06-03T12:10:28Z</dc:date>
    </item>
  </channel>
</rss>

