Recent Discussions
Hiding the SharePoint App Bar when embedding
Does anyone know if you can hide the new SharePoint App bar (global nav) with a URL query param when embedding? I've tried: env=Embedded and env=WebViewList which work in some instances, but not everywhere (e.g., List forms like newform.aspx, and most _layout pages I have checked). Example: [tenant].sharepoint.com/_layouts/15/viewlsts.aspx?view=14&env=Embedded That gets rid of alomost everything except the App bar.11KViews1like5CommentsSharepoint list format whole row using indexOf
Hoping this will be a simple question for someone who knows JSON. I'm new to JSON and have found two examples of conditional formatting I'm trying unpick to colour a whole row on a sharepoint list using indexOf to search for the string "Holiday". Our training calendar (sharepoint list) can include "School holidays", "Bank holidays", "Half term holidays" etc in the field 'Title'. Changing the column colour works for the title field alone with the following indexOf example (using if) { "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "attributes": { "class": "=if(indexOf(@currentField,'oliday') != -1, 'sp-css-backgroundColor-BgCornflowerBlue sp-field-fontSizeSmall sp-css-color-CornflowerBlueFont','')" } } And, changing the whole row background colour works with the following which does not use indexOf (using operators?) { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json", "additionalRowClass": { "operator": ":", "operands": [ { "operator": "==", "operands": [ "[$Training_x0020_Crs_x0020_Ttl]", "Holiday" ] }, "sp-css-backgroundColor-BgCornflowerBlue sp-field-fontSizeSmall sp-css-color-CornflowerBlueFont", "" ] } } To me the logic in both examples looks to be achieved in slightly different ways and I've hit a wall trying to combine the code, does anyone know how to use indexOf condition to detect 'holiday' to conditionally format the whole row? (In the code above it looks like sharepoint has kept 'Training Crs Ttl' as a reference to the field now renamed to Title but I don't think this has a bearing on the code) Many thanks ChrisSolved5.6KViews0likes3CommentsExport / Import from Excel file in SharePoint (SPFx)
Here is the tool which will help you to import excel file into a list. This tool will not create any kind of list or column. It will help users to import their excel file in specific list. This tool also allows users to update existing records directly from excel file. I have develop the tool in SharePoint Framework. Currently this tool is for SharePoint Online version only. We are supporting following columns : Single line of text Multiple lines of text Number Yes/No Person or Group (Person + Group) Person or Group (Person + Group) (Allow multiple selections) Date and Time Choice Choice (Allow multiple selections) Hyperlink or Picture Currency Managed Metadata Managed Metadata (Allow multiple values) Lookup Lookup (Allow multiple values) Installation of App :- 1. Click here to download the sps-import-from-excel.sppkg. 2. Visit the Microsoft 365 SharePoint Admin Center 3. Go to Apps -> App Catalog. If you don't have app catalog, here are the instructions for creating one. If you have Site Collection level App Catalog, just to to Apps for SharePoint from your site collection. 4. Click 'Upload' and select sps-import-from-excel.sppkg file to upload. 5. Check the box for Make this solution available to all sites in the organization and click the Deploy button. 6. A successful installation will look like this: 7. if you receive an App Package Error Message stating, "Deployment failed," as shown here, simply delete the .sppkg file and repeat steps 4 and 5 to redeploy. 8. Now go to the site where you want this tool. Just create a new page or edit existing page and add a webpart 'SPS Import From Excel'. This tool has help on each steps. You can read and start exporting or importing the excel. How To Setup How To Use Enjoy!!!5.4KViews1like4CommentsPnp Search Results Template Help
Hi, I'd like to make the search results look better. I'm currently using the below custom code. I'd like to have each result be enclosed in a box of some sort so that each search result is clearly not related to another search result. The results kind of run together. Also, the values for some of the fields that I have displaying in the search results are actually lookups from either the same or other lists on the same SharePoint site, so I would like to have those appear as clickable links instead of just text. I'd also like to know if I can have those fields not appear if there are no values to display for them. This is what the search results currently look like. Here is the current custom code that I'm using: <content id="data-content"> <style> /* Insert your CSS overrides here */ .example-themePrimary a { color: { { root.theme.palette.themePrimary } } ; } { { #unless root.properties.layoutProperties.showItemThumbnail } } .template--listItem--result { flex-basis: 100%!important; } { { /unless } } </style> <div class="template"> {{#if root.properties.showSelectedFilters}} <pnp-selectedfilters data-filters="{{JSONstringify filters.selectedFilters 2}}" data-filters-configuration="{{JSONstringify filters.filtersConfiguration 2}}" data-instance-id="{{filters.instanceId}}" data-operator="{{filters.filterOperator}}" data-theme-variant="{{JSONstringify root.theme}}"> </pnp-selectedfilters> {{/if}} {{#if root.properties.showResultsCount}} <div class="template--resultCount"> <label class="ms-fontWeight-semibold">{{getCountMessage root.data.totalItemsCount root.inputQueryText}}</label> </div> {{/if}} {{#if root.data.promotedResults}} <ul class="template--defaultList template--promotedResults"> {{#each root.data.promotedResults as |promotedResult|}} <li> <div> <pnp-icon data-name="MiniLink" aria-hidden="true"></pnp-icon> </div> <div> <a href="{{url}}" style="color:{{@root.theme.semanticColors.link}}">{{title}}</a> <div>{{description}}</div> </div> </li> {{/each}} </ul> {{/if}} <ul class="template--defaultList"> {{#each data.items as |item|}} <pnp-select data-enabled="{{@root.properties.itemSelectionProps.allowItemSelection}}" data-index="{{@index}}" data-is-selected="{{isItemSelected root.selectedKeys @index}}"> <template id="content"> <li class="template--listItem"> {{#> resultTypes item=item}} <div class="template--listItem--result"> {{#if root.properties.layoutProperties.showFileIcon}} {{#contains "['STS_Site','STS_Web']" (slot item root.slots.contentclass)}} <pnp-iconfile class="template--listItem--icon" data-extension="{{slot item root.slots.FileType}}" data-is-container="{{slot item root.slots.IsFolder}}" data-image-url="{{item.SiteLogo}}" data-size="32" data-theme-variant="{{JSONstringify root.theme}}"></pnp-iconfile> {{else}} <pnp-iconfile class="template--listItem--icon" data-extension="{{slot item root.slots.FileType}}" data-is-container="{{slot item root.slots.IsFolder}}" data-size="32" data-theme-variant="{{JSONstringify root.theme}}"></pnp-iconfile> {{/contains}} {{/if}} <div class="template--listItem--contentContainer"> <span class="template--listItem--title example-themePrimary"> <a href="{{slot item root.slots.PreviewUrl}}" target="_blank" style="color:{{@root.theme.semanticColors.link}}" data-interception="off">{{slot item root.slots.Title}}</a> </span>{{slot item root.slots.Definition}} <p></p> <span><b>Business Processes: </b>{{slot item root.slots.[Business Processes]}}</span> <span><b>Products/Services: </b>{{slot item root.slots.[Products/Services]}}</span> <span><b>Software/Apps: </b>{{slot item root.slots.[Software/Apps]}}</span> <span><b>Term Owners: </b>{{slot item root.slots.[Term Owners]}}</span> <span><b>Related Terms/Phrases: </b>{{slot item root.slots.[Related Term/Phrase]}}</span> <p></p> <span> <span class="template--listItem--author"> Term last updated by {{#with (split (slot item root.slots.Author) '|')}} {{[1]}} {{/with}} </span> <b><span class="template--listItem--date"> on {{getDate (slot item root.slots.Date) "LL"}}</span></b> </span> <div>{{getSummary (slot item root.slots.Summary)}}</div> <div class="template--listItem--tags example-themePrimary"> {{#if (slot item root.slots.Tags)}} <pnp-icon data-name="Tag" aria-hidden="true" data-theme-variant="{{JSONstringify root.theme}}"></pnp-icon> <div> {{#each (split (slot item root.slots.Tags) ",") as |tag| }} <span>{{trim tag}}</span> {{/each}} </div> {{/if}} </div> </div> </div> {{#if root.properties.layoutProperties.showItemThumbnail}} <div class="template--listItem--thumbnailContainer"> <div class="thumbnail--image"> <pnp-filepreview data-preview-url="{{slot item root.slots.PreviewUrl}}" data-preview-image-url="{{slot item root.slots.PreviewImageUrl}}" data-theme-variant="{{JSONstringify root.theme}}"> <pnp-img alt='preview-image' width="120" src="{{slot item root.slots.PreviewImageUrl}}" loading="lazy" data-error-image="{{@root.utils.defaultImage}}" /> </pnp-filepreview> <div class="thumbnail--hover"> <div> <pnp-icon data-name="DocumentSearch" aria-hidden="true"></pnp-icon> </div> </div> </div> </div> {{/if}} {{/resultTypes}} </li> </template> </pnp-select> {{/each}} </ul> {{#if root.properties.paging.showPaging}} {{#gt root.data.totalItemsCount root.properties.paging.itemsCountPerPage}} <pnp-pagination data-total-items="{{@root.data.totalItemsCount}}" data-hide-first-last-pages="{{@root.properties.paging.hideFirstLastPages}}" data-hide-disabled="{{@root.properties.paging.hideDisabled}}" data-hide-navigation="{{@root.properties.paging.hideNavigation}}" data-range="{{@root.properties.paging.pagingRange}}" data-items-count-per-page="{{@root.properties.paging.itemsCountPerPage}}" data-current-page-number="{{@root.paging.currentPageNumber}}" data-page-links="{{JSONstringify root.data.paging.links}}" data-theme-variant="{{JSONstringify root.theme}}"> </pnp-pagination> {{/gt}} {{/if}} </div> </content> <content id="placeholder-content"> <style> /* Insert your CSS overrides here */ </style> <div class="placeholder"> {{#if root.properties.showResultsCount}} <div class="template--resultCount"> <span class="placeholder--shimmer placeholder--line" style="width: 20%"></span> </div> {{/if}} <ul class="template--defaultList"> {{#times root.properties.paging.itemsCountPerPage}} <li class="template--listItem" tabindex="0"> <div class="template--listItem--result"> {{#if root.properties.layoutProperties.showFileIcon}} <div class="template--listItem--icon placeholder--shimmer "></div> {{/if}} <div class="template--listItem--contentContainer"> <span class="placeholder--shimmer placeholder--line" style="width: 60%"></span> <span class="placeholder--shimmer placeholder--line" style="width: 100%"></span> <span class="placeholder--shimmer placeholder--line" style="width: 100%"></span> <span class="placeholder--shimmer placeholder--line" style="width: 35%"></span> <span class="placeholder--shimmer placeholder--line" style="width: 20%"></span> </div> </div> {{#if root.properties.layoutProperties.showItemThumbnail}} <div class="template--listItem--thumbnailContainer"> <div class="thumbnail--image"> <div class="placeholder--shimmer" style="width: 120px;height: 70px;"></div> </div> </div> {{/if}} </li> {{/times}} </ul> </div> </content>4.3KViews0likes2CommentsHow to get who created M365 Group using PowerShell?
How do we find who created M365 group using PowerShell? Graph API?Solved3.6KViews0likes2CommentsAdd-PnPGroupMember won't map a user
With the following command I will entitle our users to a specfic site: Connect-PnPOnline -Url https://xxx.sharepoint.com/sites/yyy -Credentials $userCredential2 $groupMember = Get-PnPGroup -AssociatedMemberGroup $gruppennameM = $groupMember.Title $groupid = $groupMember.Id Add-PnPGroupMember -LoginName user@company.com -Group $groupid After sending command above I get the following error: Add-PnPGroupMember : Method not found: "Int32 System.Text.Encodings.Web.TextEncoder.FindFirstCharacterToEncodeUtf8(System.ReadOnlySpan`1)". The command is full correct, the ID of the group is correct and the user is correct. Why does the command not work for me ?3.4KViews0likes2CommentsHow to display hyperlink with Display text in PNP Search results webpart?
Hi I have a list that contains a url column. I'm trying to display the list items in PNP Search results webpart. However it is displaying only the link present within the column but not the hyperlink. Where am I going wrong? Can anyone please advise? The list column is like this: Only links are displayed like this. Thanks Raj2.7KViews0likes2CommentsHelp with an Excel Formula/Command Please
Good Afternoon, I need help with a formula which I am trying to put into an Excel Spreadsheet please. I'm not sure how to do what I want to do. Please See The Diagram Below. I am wanting to put a formula into cell E3 so that the 'correct' currency name & symbol will display in this cell (E3) when a particular currency is selected from the yellow box. The formula would need to be something like "(if I4 = 1 then E3 equals H3) or (if I4 = 2 then E3 equals H4) or (if I4 = 3 then E3 equals H5) or (if I4 = 4 then E3 equals H6). That way the (spreadsheet) user can select their preferred currency, by simply putting the appropriate number in cell I4 (light yellow colored) and then the corresponding symbol/currency type will post over to E3 in the 'Currency Convertor" (from column H). I hope someone can help. Many thanks, Andrew.Solved2.4KViews0likes8CommentsWhat is the M365 PnP Community?
Intro The Microsoft 365 PnP Community is the virtual home for everyone who wants to extend Microsoft 365 beyond the standard. We want to share knowledge, learn from each other and achieve more together. This hub will be a part of the Microsoft 365 Patterns and Practices community and will complement our existing initiatives under the PnP umbrella, such as our open-source projects and Community Docs, where we explain how the different features of Microsoft 365 work and offer guidance on how to use them. Mission: Our mission is to create a single inclusive and welcoming place for everyone who wants to build on Microsoft 365. Goals: Drop labels We do not want to distinguish between so-called developers and citizen developers or spend much energy putting people into boxes. We want to provide guidance, knowledge, and reusable patterns and practices for everyone who wants to build on top of Microsoft 365, regardless of their profession, role, technical background, approach, or skill level. By living our Sharing is Caring mission, everyone will benefit. One Community Having one community as a virtual home for everyone who wants to extend Microsoft 365 will break down information silos and broaden everyone’s horizon, which will lead to better outcomes and more connected solutions. Sharing ideas across products using no code, low-code, and coded solutions in one single place will bring our communities closer together. Lower entry barriers We want to let our community grow and get new people involved, so we want to also cater to people who are not in that community right now and lower entry barriers. Helping everyone getting started rather than gatekeeping is one of our primary goals. Being inclusive Appreciating people from all backgrounds and with different expertise will ensure inclusiveness and improve our ability to step outside of our comfort zones and respect diverse perspectives. Learning that there is no pecking order of power users, makers, and developers but that we will be most successful when we focus on a bettertogether approach will make a huge difference. What can you expect in this community? We learned that people build solutions that span multiple Microsoft products with varying degrees of complexity, and we shouldn’t compartmentalize communities. We like to bring people together by guiding and sharing knowledge and listening to understand people’s needs. Please expect blog posts, videos, and open discussion on all kinds of topics around building on Microsoft 365. We are here to help. How can you get involved? This community doesn’t have any entry barriers; it’s made for everyone who extends Microsoft 365, including no-code, low-code, or coded solutions. Join us for our community calls Let us know what you'd like to know more about, please don't be shy, all feedback is welcome. If you create (blog, vlog, code on GitHub) let us know where so that we can share it with others If you'd like to show your work, let us know and we'll get you a slot on the community call Meanwhile, explore what we have to offer #SharingIsCaring ❤2.3KViews10likes0CommentsPhone Call Link in SharePoint View/Column Formatting
Does anyone know of a way (or a workaround) to get tel:123-456-7890 links working in view/column formatting? This would be very helpful for showing contact links with "click to call" on mobile. It already works for "mailto" links, but "tel" links are not working.Solved2KViews0likes3CommentsConnect-PnpOnline: Getting error Length can not be zero. Parameter:Length
While connecting to SharePoint Online inside azure queue function I am getting error "Length can not be zero. Parameter:Length". I am using self signed certificate, key and Client ID to connect to sharepoint online. Anyone else facing the same issue ?2KViews0likes3CommentsNeed to remove one drive folder using PnP Powershell
Hi Team, I'm trying to remove a folder using PnP and its throwing error as 404 Not Found, commands i am using as below Connect-PnPOnline -Url "onedrive Url" - credential (Get-Credential) $name = "Nest1" $Folderpath = "Document\Nest1" Remove-PnPFolder -Name $name -Folder $Folderpath - Force -Recycle Thank you for your help Regards Saurav1.9KViews0likes2CommentsSorry 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.7KViews0likes0CommentsSharepoint form list footer send email, field [$Start Time] (possible href)? issue
We're using a sharepoint calendar list and the JSON code in the footer sends an email based on values in the current record. It's partially working and so far I've been able to populate the email subject and body using href and can retrieve the field [$Title] - a string. However I've not been able to retrieve the value [$Start Time] which is a field of type date and not a calculated field. [edit] found this to display a date in JSON but I couldn't get it to work inside the href 'block' "txtContent": "=toLocaleString(@currentField)" I'm not a developer so this is mostly cobbled together from around the internet and MS examples, thanks in advance 🙂 Chris Here's the current code { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "children": [ { "elmType": "span", "style": { "padding": "12px" }, "txtContent": "='Email trainer: ' + [$Trainer] + ' with details for: ' + [$Title]" }, { "elmType": "a", "attributes": { "iconName": "Mail", "class": "sp-field-quickActions", "href": { "operator": "+", "operands": [ "mailto:", "[$Trainer]", "?subject=WFD Training Calendar reminder for: ", "[$Title]", "&body=You are listed as trainer for the training event ", "[$Title]", " from ", "[$Start Time]", " to ", "[$End Time]" ] } } } ] } @sharepoint @JSON1.6KViews0likes0CommentsWhat do you use Microsoft Graph for?
I am curious again - how do you Microsoft Graph? What did you build with it? If you need some ideas, head over to our blog where you can find some cool articles To me, it's almost the answer to everything, whenever I ask myself 'How can I build this?'1.5KViews0likes3CommentsHelp deleting 'folder' in SPO?
We've gotten a into a strange situation with a modern SharePoint Online site and could use some help/ideas on how to get out of it: A file was deployed with the Feature framework style of deployment to a path of /SiteAssets/myfile.ext. However, this happened prior to the Site Assets library actually being created by the 'just-in-time' model used on modern sites. As a result, the site now has a root 'folder' named SiteAssets and it is blocking the JIT creation of Site Assets library. When I say 'folder' think web/IIS folder, NOT a SharePoint folder in a library. How would one delete this kind of 'folder' such that the Site Assets library can actually be created? I've tried various forms of SPO/PnP PowerShell and none of the cmdlets seem to work with this kind of 'folder' 😞 Any help/ideas would be MUCH appreciated...Solved1.4KViews0likes4CommentsUpload multiple files to list item in custom new form using SFPx react
Hi, I am new to SPFx. I need to attach multiple files to new list item using SFPx. I am using 'List Item Attachments' PnP control to browse the files. https://pnp.github.io/sp-dev-fx-controls-react/controls/ListItemAttachments.html I am able to upload only single file using this control. When I am selecting more than 1 files, the files are not attaching to the list item. Below is the sample code given in the above url listItemAttachmentsComponentReference.current.uploadAttachments(1); // Here 1 is the item Id. I tried hard coding the item Id, but still it is not attached if the control contains more than 1 file. Can you please help me on this. If you have any alternate with any other control to upload multiple attachments to new list item please let me know and share the reference url. Thanks, Kishore.1.3KViews0likes0CommentsI met a error as "items are nested at level '9' which exceeds the maximum nesting limit of '8'."
Hi all: I met a error as "items are nested at level '9' which exceeds the maximum nesting limit of '8'." in power automate flow. Would you please tell me how to solve this issue in details? Thank you very much in advance:)1.2KViews0likes0Comments