0

I have a column of type workflow status that is present in some but not all document libraries in a site. When I use power automate to move these files, I am met with an error that says the move failed due to a missing column of type workflow status.

Here is the column in SharePoint designer: enter image description here

This is what I see when I try to delete in in SharePoint designer:

enter image description here

There is no option to delete this column in SharePoint Online, I have already disabled all SharePoint workflow related features on this site.

Is there a way to delete read only columns from SharePoint Lists/Libraries?

0

This looks like a SharePoint 2010 or 2013 workflow is associated with this list/library. The column has been created by the workflow and you cannot delete it while the workflow is still associated with the list/library. It is not sufficient to disable SharePoint workflow features.

You need to edit the list/library in SPD and delete the actual workflow.

3
  • the workflow has already been deleted, the column remains even after that part. any other ideas? – Josh Sharkey Aug 6 '20 at 13:57
  • Well, if the workflow was still running for some of the items, deleting it may have been premature. Did you check that there were no current running instances? Anyway, that's too late now. What happens if you create a column in the target list/library with the same name as a text type. If item copy works then, copy the items, and afterwards delete the column in the target list. – teylyn Aug 6 '20 at 21:00
  • Reproducing this issue on a library that does not have running workflow instances does not resolve this issue. The copy item action does not copy the version history/file metadata so I cannot use this action. I am working on a solution using the SPOMod Powershell Module and will circle back here if the script is successful. – Josh Sharkey Aug 6 '20 at 23:31
0

Go to list/library settings> workflow settings> remove the workflow you don't need.

Then try to delete the column again to compare the result.

1
  • the workflow has already been deleted, the column remains even after that part. any other ideas? – Josh Sharkey Aug 6 '20 at 13:56
0

Was able to delete the column by using a powershell module SPOMod

Workflow status columns may be deleted using the cmdlets in this module, or by setting the read-only property to false, following with manual deletion using sharepoint designer. This is the second method:

First install this SharePoint Online SDK (Choose sharepointclientcomponents_16-6906-1200_x64-en-us.msi, the other one does not work.)

Download and extract the script from here

Import that script into this following program and run it to set the read-only property of all workflow status columns to false:

Add-Type -Path (Resolve-Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll")
Add-Type -Path (Resolve-Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll")
Add-Type -Path (Resolve-Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll")


import-module {{SPOMod Location}


$UserName = {{your username}}
$Url = {{your site}}


Connect-SPOCSOM -username $UserName -url $url

$lists = (Get-SPOList -IncludeAllProperties | where {$_.BaseType -eq "DocumentLibrary"}).Title

foreach($list in $lists) {
 write-host "List: $($list) \n"
 $fields = (Get-SPOListFields -ListTitle $list).Title
 foreach($field in $fields){
  $c = Get-SPOListColumn -ListTitle $list -FieldTitle $field # | export-csv .\$($list).csv -Append
  $xml = [xml]$c.SchemaXML
  if ($xml.Field.Type -eq "WorkflowStatus") {
   $xml
   set-spolistcolumn -ListTitle $list -FieldTitle $field -ReadOnlyField $false
  }
 }
}

After this script has run, you can open the libraries in SharePoint Designer and delete the columns successfully.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.