0

The issue is that a site column that is included in a content type isn't being included in a document library that is using the content type.

Some context to this:

We have a site column "A" that is being included in a custom content type. This content type inherits from the Document content type. When a document library is created and the content type applied to it, column "A" isn't included in the columns in the library. If I look at the library via PowerShell however, column "A" does appear. I have checked the column to check if it's hidden, but it's not.

Column "A" is also being used on another custom content type, which is based off the article page content type, and when a library is created with this content type, the column displays fine.

The strange thing is when the column is added to the library, when comparing the Title of the column between the working and non working content type libraries, they're different but the id's are the same.

Working

enter image description here

Not working

enter image description here

I have tried adding and re-adding the field to the field to the content type but this hasn't corrected it.

I'm not sure what to try next so any help would be greatly appreciated.

1 Answer 1

0

It turns out there are some properties on the site column that set it to show. Below is the PowerShell to fix the problem:

$web = get-spweb "Site Address"
$column =  $web.Fields.GetFieldByInternalName("Column Name")
$column.ShowInDisplayForm = $true
$column.ShowInEditForm = $true
$column.ShowInNewForm = $true
$column.ShowInListSettings = $true
$column.PushChangesToLists = $true
$column.Update()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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