PnP
5 TopicsImporting JSON as a list in SharePoint Online via pnp
I'm trying to import a JSON list file to my Sharepoint online website. But it seems impossible to import it directly. Does anyone know a possibility via pnp because I saw a method on pnp named "fromJson" but I don't know how to use it to import my files to my SharePoint website. Thanks in advance!16Views0likes0CommentsPnP - Search Filters template with multi-values
How do I update the template for PnP filters to separate the multi-values? This is what the filter options look like now: This is what the filter options should look like: The code I have now for the filter template is: <content id="data-content"> <style> .filter { margin-bottom: 30px; } .filter--value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; } .filter--message { padding: 10px; } .filter--name { font-weight: bold; font-size: 16px; color: rgb(119, 117, 111); padding: 0px 0px 5px; } pnp-filtercheckbox { max-width: 100%; } pnp-filtercombobox { flex: 1; } pnp-filterComboBox > div { display: flex; align-items: stretch; padding: 0; } .filterComboBox { align-items: center; flex: 1; } #{{@root.instanceId}}wrapper { max-width: 100% !important; } .ms-ComboBox { max-width: 100% !important; min-width: 100%; width: 100%; } .ms-ComboBox-container { width: 100%; } .ms-ComboBox-header { bottom: 0; height: 45px; position: fixed; top: 127px; } .ms-Fabric { width: 100%; } </style> <div class="template vertical"> {{#each root.filters as |filter|}} <div class="filter"> <div class="filter--name">{{filter.displayName}}</div> <div class="filter--value"> <pnp-filtercombobox data-instance-id={{@root.instanceId}} data-filter-name="{{filter.filterName}}" data-is-multi="{{filter.isMulti}}" data-show-count="{{filter.showCount}}" data-theme-variant="{{JSONstringify root.theme}}" > {{#each filter.values}} <option value="{{value}}" data-selected="{{selected}}" data-disabled="{{disabled}}" data-count="{{count}}">{{name}}</option> {{/each}} </pnp-filtercombobox> </div> </div> {{/each}} </div> </content> I've tried a few different options with the help of ChatGPT but did not get anywhere.529Views0likes0Commentswhere to add PnPTelemetry code in SPFX PnP solution
Hi all, I need to include PnP Telemetry in my code. I am working on SPFX React based solution. I haven't used it before. Can you guide me where to use below lines of code, in Constructor or render method? const telemetry = PnPTelemetry.getInstance(); telemetry.optOut(); This is one of app deployment requirement, haven't found much documentation about it. Will apricate your help on this.661Views0likes0CommentsInclude X-ClientTag header
I am working on react based SPFX solution and using PnP module for retrieving list data. IT Deployment teams asked me to must include X-ClientTag header on SharePoint client side calls. I am using below line of code for retrieving date. import { sp } from "@pnp/sp"; sp.web.lists.getById(<list id>).items.get(); //sample line Let me know if we can add X-ClientTag header with above code?848Views0likes0CommentsSorry we couldn't remove the app - SharePoint Online
Some time you try to remove some installed apps from SharePoint and it removes approx. all the time but some apps says "sorry we couldn't remove the app". To remove these kind of apps, You have to use PowerShell Scripts. So there are some steps : 1. Install PnP PowerShell (Click Here) 2. Now run the following PnP command with URL and App Name changes : Connect-PnPOnline –Url <Your_Site_Collection_URL> –Credentials (Get-Credential) $instances = Get-PnPApp $instance = $instances | where {$_.Title -eq '<My_App_Name'} #Uninstall-PnPApp -Identity $instance.Id Remove-PnPApp -Identity $instance.Id1.8KViews0likes0Comments