2010
155 TopicsHow to Properly Delete Custom Columns in SharePoint
SharePoint custom columns have been around for quite some time, but I’m finding that there’s still some confusion on how the various types are used, and more importantly how can you delete them. In this post, I’m hoping to shed some light on the topic. Custom columns form a part of your overall SharePoint Information Architecture. When properly set up, custom columns (or fields as sometimes referred to in SharePoint) are ideal for capturing metadata in a consistent way across various types of content. In SharePoint, you can create custom columns in one of two ways: Custom List Column Custom List columns are created directly within a list (or library). They can be accessed via the list and used to store information. Although quick to set up, one of the major drawbacks is that list columns are limited in scope to only the list in which you created them. You cannot leverage the site columns outside of the list. This reason alone can prevent such columns from being considered for scalable solutions where you would have to add the same columns to multiple lists or libraries throughout a SharePoint site. Custom Site Columns Custom Site columns, as their name suggests, are created at the site level. Unlike their List Column relatives, the Site columns are accessible throughout the entire site collection, where you can add them to any number of lists, libraries, and content types. When you change the Site column properties, you have the choice to propagate these changes to all instances where the Site column is in use. Deleting Custom Columns If you wish to remove a custom column, it’s important to understand your options and the ramification they have on your data as described below. Deleting a List Column As I’ve mentioned earlier, when you create a new column within a list or library (not selected from pre-existing site columns), the list owns the column, and the column is only accessible to the list. Therefore, you can easily delete it from the List Settings by selecting the column and then clicking the Delete button on the form. Keep in mind that once you delete the list column, you also lose any data associated with the column. Deleting a Site Column from a List A reference to the site column is added when you add a site column directly to a list. As mentioned above, whenever you change the site column, any instances that use it will change as well. In the example below, I’m showing a Date field that has been added directly to two lists. If you try and delete the Date site column, you will see a warning message similar to This site column will be removed and all list columns which were created from it will be permanently orphaned. Are you sure you want to delete this site column? What does orphaned mean? Well, think of the site column as being the parent that controls its children (the referencing site columns within the lists). They will behave as their parent does. When you delete the parent, then you are in essence converting the site columns within the lists into list columns that lose the relationship between them. In other words, each list will have its unique copy of the site column with all the same settings just before you deleted the site column. You cannot undo this change. Deleting a Site Column from a Content Type When you add a site column to a content type, you’re following better practices for your Information Architecture by encapsulating all required metadata into a reusable entity (content type) rather than dealing with the individual site columns in each list. On the flip side, deleting your site column now becomes a bit trickier. If you tried to remove a site column that is associated with a content type, you might have seen a message as Site columns which are included in content types cannot be deleted. Remove all references to this site column prior to deleting it. What you need to do in this case is remove the site column from each content type before removing it. But what do you do if you don’t know where it’s used? In this case, you can leverage PowerShell to help you get the answer you need. To find out what content types are using your site column, you first need to know the InternalName of your site column. You find it by going to the site column (Site Settings à Site Columns) and looking at the URL as depicted below. In my case, the field is called Date1. Now you can run the script below that is based on OfficeDev PnP to search all the content types in a site collection. The script lists all the content types that use the site column you wish to delete (NOTE: to run the code I’ve supplied below, you must install the OFficeDev PnP solution first from https://github.com/OfficeDev/PnP-PowerShell). Connect-Sponline -url "your_tenant_url" $fieldInternalName = "your_field" $web = Get-SPOWeb Write-Host "Searching for:" Write-Host "InternalName: $fieldInternalName" Write-Host Write-Host "Get Content Types" $cTypes = Get-SPOContentType | where {($_.Hidden -eq $False) -and ($_.Group -ne "_Hidden")} # Search through all the non-hidden content type and find which ones include the site column foreach($ct in $cTypes) { $fields = $ct.Fields $web.Context.Load($fields) $web.Context.ExecuteQuery() $field = ($fields | where {$_.InternalName -eq $fieldInternalName}) if ($field -ne $null) { Write-Host "Content Types: $($ct.Name)" Write-Host "Content Type ID: $($ct.ID)" } } The output will look something similar to the image below. Searching for: InternalName: Date1 Get Content Types Content Types: TestCT Content Type ID: 0x01010038A3F80D4105C845BDD6A523CB1CC969 Now you need to go to the Content Types (Site Settings à Site Content Types) and look for the content types by name. If you see any duplicates, compare the content type ID against the one listed in the URL. Just remember, removing the columns from the content type will delete the content of those columns. That’s it. Now you know what to look for when removing your custom columns. Good luck.52KViews5likes13CommentsConfluence to SharePoint migration
https://caseagile.com/products/enterprise-bridge/confluence-to-sharepoint-migration/® is an essential part of the efficient SharePoint®deployment strategy for organizations of any structure and size. https://caseagile.com/products/enterprise-bridge/confluence-to-sharepoint-migration/® dramatically reduces the effort and time for migration to SharePoint®, eliminates migration errors and ensures that the entire corporate digital archive is seamlessly moved to new digital platform. https://caseagile.com/products/enterprise-bridge/confluence-to-sharepoint-migration/ supports Confluence on premise servers and Confluence online, SharePoint 2010, 2013, 2016 and SharePoint Online. It transfers text, images, tables, wiki pages, documents, files, videos etc. Despite evident advantages and improvements offered by SharePoint®, the decision for the actual deployment of the portal does not always come easy. It is complicated with concerns about large amounts of corporate documents spread across legacy storage sites, such as existing intranet sites, network accessible storage (NAS) and even local hard disks of user workstations. Associated expenses for content migration and potential disruptions of access during the transition can be significant arguments impeding the important management decision. https://caseagile.com/products/enterprise-bridge/confluence-to-sharepoint-migration/® resolves these concerns in a simple and elegant way by offering automated content migration scenarios enforced with elaborate transformation engine supporting conversion of data, meta-data, security and permissions. Migration of data from Confluence ® (cloud or on-premise) to SharePoint ® Online, 2016, 2013 or 2010. Migration of text, images, tables, wiki pages, documents, files, videos and other content to SharePoint ® . Spaces, when migrated to SharePoint ® are distinguished and identifiable. Pages and sub-pages, after migration, are in the same order as that of Confluence ® . Migration of most widely spread and popular Confluence ® macros. Maintains the source page formatting. Wiki pages migrated to SharePoint ® are in the same format as that of the Confluence ® in terms of text, images, links and more. Links to other Confluence ® pages and documents (Related Articles) remain intact when migrated to SharePoint ® . Created and modified dates of the spaces, pages and files remain the same after migration. Owners and contributors of the spaces, pages and files remain the same after migration, as well as permissions of users and groups as they existed on source server. Labels on each page come across when migrated to SharePoint ® . Destination SharePoint ® fields for this content are configurable through visual mapping. Support two-factor authentication and proxy. Full compliance to most rigid and contemporary corporate security standards.53KViews2likes0Comments"Business Intelligence Center" site template is missing when creating a new online sub-site
I am working on migrating an on-premises sharepoint 2010 site collection to sharepoint online. now the on-premises 2010 site collection contain a sub-site of type "Business Intelligent" , so i was checking if i can create such as site template inside sharepoint online. now i find this link which mentioned that this should be possible @ Create A Business Intelligence Center Site Collection In Office 365 (SharePoint Online Site) . but in our case when i tried to create a new sub-site inside our online root site collection (which is of type classic team site), i did not find any site template for BI, here is the list we got:- so i am not sure how we can create a new sharepoint online sub-site that should replace the on-premises sub-site which is of type BI?4.3KViews1like9CommentsTalking SharePoint Virtual Summit with Dan Holme [VIdeo Interview]
Recapping SharePoint Virtual Summit with Dan, the Man, Holme Hi y'all! On the most recent edition of Dux Quax (mobile edition!), I took a ride with Microsoft’s Director of Product Marketing for SharePoint Dan Holme to recap the 2017 SharePoint Virtual Summit! Get a front row seat as we discuss announcements made at the summit, like the new SharePoint Admin Center and hear what Dan has to say about data security in Office 365, and Microsoft’s plan of attack moving forward! Check out the video here: www.avepoint.com/blog/strategy-blog/dux-quax-microsoft-dan-holme/ As always, remember to keep the conversation going! Tweet your questions to Dan (@danholme) and me (@meetdux).991Views1like0CommentsSharePoint 20XX: Script PowerShell to export in CSV all the SPLists from a SPFarm
Based on a script created by Benoit Jester To export in CSV all the Sites and Subsites from a SPFarm: SharePoint 20xx : Script PowerShell permettant de lister les sites peu utilisés I created a new PowerShell script you have just to adapt (only 2 parameters) and execute (or schedule) to have the CSV you can open to check the content you have into your SPFarm. param( [Parameter(Mandatory=$False)] [bool]$displayMessages = $true, [Parameter(Mandatory=$False)] [string]$SMTPServer="", [Parameter(Mandatory=$False)] [string]$ToEmailAddress="", [Parameter(Mandatory=$False)] [string]$FromEmailAddress="", [Parameter(Mandatory=$False)] [string]$delimiter="|" ) [array]$ExceptionListnames = "List Template Gallery", "Master Page Gallery", "Site Template Gallery", "Web Part Gallery", "User Information List", "Settings", "Galería de plantillas de sitios", "Galería de plantillas de listas", "Galerie de modèles de sites", "Galerie de modèles de listes" [string]$FarmType = "YOUR INTRANET TEAMSITES" [string]$FolderToPutCSVName = "C:\TEMP\" [string]$CSVFileName = "Lists-Usage-YourTeamsites.CSV" [string]$ColorToShow = "green" [string]$MyListIndexedColumns = "" $pattern = '[^a-zA-Z]' [string]$ColumnTitleCleaned = "" # Applies Read Access to the specified accounts for a web application Function Add-UserPolicy([String]$url) { Try { $webapp = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup("$url") $user = ([Security.Principal.WindowsIdentity]::GetCurrent()).Name $displayName = "Sites Usage Read Account" $perm = "Full Read" # If the web app is not Central Administration If ($webapp.IsAdministrationWebApplication -eq $false) { # If the web app is using Claims auth, change the user accounts to the proper syntax If ($webapp.UseClaimsAuthentication -eq $true) {$user = 'i:0#.w|'+$user} [Microsoft.SharePoint.Administration.SPPolicyCollection]$policies = $webapp.Policies [Microsoft.SharePoint.Administration.SPPolicy]$policy = $policies.Add($user, $displayName) [Microsoft.SharePoint.Administration.SPPolicyRole]$policyRole = $webapp.PolicyRoles | where {$_.Name -eq $perm} If ($policyRole -ne $null) {$policy.PolicyRoleBindings.Add($policyRole)} $webapp.Update() If($displayMessages) {Write-Host -ForegroundColor White " Read access applied for `"$user`" account to `"$url`""} } } Catch { $_ Write-Warning "An error occurred applying Read access for `"$user`" account to `"$url`"" } } # Load assemblies Function Load-Assemblies { Try { If ((Get-PsSnapin |?{$_.Name -eq "Microsoft.SharePoint.PowerShell"})-eq $null) { If($displayMessages) { Write-Host -ForegroundColor Green "-----------------------------------------" Write-Host -ForegroundColor Green " - Loading SharePoint Powershell Snapin -" Write-Host -ForegroundColor Green "-----------------------------------------" } Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction Stop | Out-Null } } Catch { If($displayMessages) { Write-Host -ForegroundColor Green "------------------------------------------" Write-Host -ForegroundColor Green " - Loading Microsoft.SharePoint Assembly -" Write-Host -ForegroundColor Green "------------------------------------------" } [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | Out-Null } } # Send Email with log file as attachment Function SendEmail($attachment) { Try { If($displayMessages) { Write-Host -ForegroundColor White "--------------------------------------------------------------" Write-Host -ForegroundColor White " Sending Email to $ToEmailAddress with $attachment in attachment." } Send-MailMessage -To $ToEmailAddress -From $FromEmailAddress -Subject "Sites Usage - $env:COMPUTERNAME" -SmtpServer $SMTPServer -Attachments $attachment If($displayMessages) {Write-Host -ForegroundColor Green " Email sent successfully to $ToEmailAddress"} } Catch {Write-Warning $_} } $DateStarted = $(Get-date) If($displayMessages) { Write-Host -ForegroundColor Green "----------------------------------" Write-Host -ForegroundColor Green "- Script started on $DateStarted -" Write-Host -ForegroundColor Green "----------------------------------" } # Check Permission Level If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {Write-Warning "You don't have Administrator rights to run this script."} else { If($SMTPServer) { If (!$ToEmailAddress -or !$FromEmailAddress) { Write-Warning "Please specify a 'ToEmailAddress' and a 'FromEmailAddress' parameter." Exit } } # Load assemblies Load-Assemblies # Local variables $sitesList = $null $sitesList = @() # Build structure $itemStructure = New-Object psobject $itemStructure | Add-Member -MemberType NoteProperty -Name "FarmType" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "SPWebAppURL" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "SPSiteCollURL" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "SPWebURL" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "ListTitle" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "ListGUID" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "ListCreated" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "ListLastModifiedDate" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "ListDefaultViewURL" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "ListTemplate" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "ListItemsNumber" -value "" $itemStructure | Add-Member -MemberType NoteProperty -Name "ListIndexedColumns" -value "" If($displayMessages) { Write-Host -ForegroundColor Green "-----------------------" Write-Host -ForegroundColor Green " - Scanning All Sites -" Write-Host -ForegroundColor Green "-----------------------" } # Browse sites $WebSrv = [microsoft.sharepoint.administration.spwebservice]::ContentService foreach ($webApp in $WebSrv.WebApplications) { foreach ($AltUrl in $webapp.AlternateUrls) {Add-UserPolicy $AltUrl.uri} foreach ($site in $WebApp.sites) { $rootweb = $site.RootWeb; foreach($web in $site.AllWebs) { foreach($MyList in $web.lists) { if($ExceptionListnames -notcontains $MyList.Title) { $MyListIndexedColumns = "" foreach($MySPField in $MyList.Fields) { if($MySPField.Indexed) { $ColumnTitleCleaned = $MySPField.Title -replace $pattern, '' $MyListIndexedColumns += $ColumnTitleCleaned +"["+ $MySPField.InternalName +"]; " } } if($MyList.ItemCount -gt 5000) { $ColorToShow = "red" } else { $ColorToShow = "green" } If($displayMessages) { Write-Host " -------------------------------------------------- " Write-Host " List Name:", $MyList.Title, "- GUID:", $MyList.ID -foregroundcolor $ColorToShow Write-Host " >>SPWebURL URL:", $web.Url -foregroundcolor $ColorToShow Write-Host " >>Items Count:", $MyList.ItemCount -foregroundcolor $ColorToShow Write-Host " >>Created Date:", $MyList.Created -foregroundcolor $ColorToShow Write-Host " >>Last modified Date:", $MyList.LastItemModifiedDate -foregroundcolor $ColorToShow Write-Host " >>List Indexed Columns:", $MyListIndexedColumns -foregroundcolor $ColorToShow } # Build structure $siteInfos = $itemStructure | Select-Object *; $siteInfos.FarmType = $FarmType; $siteInfos.SPWebAppURL = $web.Url.Split("/")[2]; $siteInfos.SPSiteCollURL = $site.URL; $siteInfos.SPWebURL = $web.Url; $siteInfos.ListTitle = $MyList.Title; $siteInfos.ListGUID = $MyList.ID; $siteInfos.ListCreated = $MyList.Created.ToString('d'); $siteInfos.ListLastModifiedDate = $MyList.LastItemModifiedDate.ToString('d'); $siteInfos.ListDefaultViewURL = $MyList.DefaultViewUrl; $siteInfos.ListTemplate = $MyList.BaseTemplate; $siteInfos.ListItemsNumber = $MyList.ItemCount; $siteInfos.ListIndexedColumns = $MyListIndexedColumns; $sitesList += $siteInfos; } } } } $rootweb.Dispose() } # CSV Export If($displayMessages) { Write-Host -ForegroundColor Green "---------------" Write-Host -ForegroundColor Green " - CSV Export -" Write-Host -ForegroundColor Green "---------------" } $sitesList | Where-Object {$_} | Export-Csv -Delimiter "$delimiter" -Path $CSVFileName -notype If($displayMessages) {Write-Host "Export file $CSVFileName successfully generated."} # Export File To DBServer Copy-Item $CSVFileName $FolderToPutCSVName # Email notification If($SMTPServer) {SendEmail $CSVFileName} # End If($displayMessages) { Write-Host -ForegroundColor Green "---------------------------------" Write-Host -ForegroundColor Green "- Script started : $DateStarted -" Write-Host -ForegroundColor Green "- Script finished : $(Get-date) -" Write-Host -ForegroundColor Green "---------------------------------" } Exit } In my case, i scheduled that script to prepare the migration from SP OnPrem to SPO and implement for example the correct indexed columns. Fabrice Romelard [MVP] Original Message (in french): SharePoint 20XX: Script PowerShell pour exporter en CSV toutes les listes d’une ferme pour auditer le contenu avant migration1.6KViews1like0CommentsSharePoint Online List querying with "app only" API: XML output vs JSON Output
Hi We have created a new list in a modern site. This list contain a rich-text column containing string values with encoded characters like <, >. Then we try to query with "app only" API like below. https://Sample.com/sites/ThanujaSite/_api/web/lists/getbytitle('SampleList')/items if the XML out put is targeted, then the output coming would look like < and > for the characters mentioned above which is not usable for us. However if we target JSON output, characters retrieves properly. But we need the XML output since it is to be feed on to another application for processing; and re-creating that app to accept JSON is more work for us. we would like to know, if this is a limitation in SP Online now? NOTE: graph API is not used because it always provide JSON output not the XML output. So using Graph API is a blocker for this requirement. Any help appreciated1.3KViews1like2CommentsThe absolute basics of version history for everybody
Version history is likely one of the best features of SharePoint. No more email attachments spinning around with different info. And you only need one master file, no more having 30 copies of a reviewed file in a shared drive. But it's reasonably complicated. Everyday SharePoint users need to know how it works and how it improves their work day. Share this post with them so they can get the most out of it. http://icansharepoint.com/the-absolute-basics-of-version-history/796Views1like0Comments