Last week I demoed an improved solution of my previous blog post: Using JavaScript and Cloud Flows to download files from a SharePoint document library in Power Pages in the Microsoft 365 & Power Platform community (PnP) call.
The Cloud flows are the same as on the previous post, but on the JavaScript side there were a few updates:
- Using jQuery instead of Vanilla Js
- Added more comments to the code
- Added option to preview PDF files on a new tab (be aware that you need to allow pop-ups in your browser for the site address for it to work)
Source code
The updated source code for the Power Pages page follows below:
<div class="row" style="min-height: auto; padding: 8px;">
<div class="container" style="display: flex; flex-wrap: wrap;">
<div id="divFolderBreadcrumbContainer" class="spbreadcrumb" style="margin-bottom: 16px; width: 100%;"></div>
<div class="spfoldercontent" style="min-width: 360px; width: 100%;">
<div id="table_container"></div>
<div...
Source link
More About This Author
-
SharePoint and Office 365 Consultant/Developer always trying to get the best from Microsoft stack (Microsoft 365/Azure/Power Platform and related stuff).
Living in Ireland since 2018, I had previously worked in Brazil as a consultant/developer for Office 365, SharePoint and related technologies for almost 10 years.
Array
- Modern Workplace13 April 2024Power Pages and Cloud Flows – Validate user against Dataverse records based on Contact ID
- Modern Workplace6 April 2024Download SharePoint library files in Power Pages with JavaScript and Cloud flows – Improved code using jQuery & option to open PDF file in a new tab
- Modern Workplace13 March 2024Handle multiple N:N records associate and disassociate requests with JavaScript and Power Pages Web API
- Modern Workplace17 February 2024Generic JavaScript Functions to Associate and Disassociate Dataverse records using the Power Pages Web API