2

I followed these steps in creating this list. I've been successful using this method in other lists on this site.

  1. Create any new site columns needed.
  2. Create the site content type.
  3. Add the site columns to the site content type.
  4. Create the list.
  5. Add the content type to the list.

However, two of the site columns from the content type do not appear when I view List Settings. When I click on the content type on the List Settings page, the columns are not listed. When I view the content type from the Site Content Types page, the columns are listed.

I tried to add the missing columns back in to the list content type. I clicked on the content type from List Settings. Then I clicked on "Add from existing site or list columns." The missing columns are not available to be added.

How do I get these columns back into the list content type?

  • I've just encountered this issue as well, but I'm using SharePoint Online. I did exactly what you have done, and my site column works in five other content types that already exist (I created them a few months ago). Have you had any success in trouble-shooting this? – Kitty Dunle Mar 9 '16 at 0:52
  • Sadly, no. I ended up completely recreating the content types. – DeNaeL Mar 28 '16 at 13:06
2

I had a very similar problem, which I could solve with some powershell and reflection.

The setting:

  1. Create some site columns
  2. Create site content type
  3. Create list
  4. Add above content type to list

Intermediate result: All is fine. All columns are visible. Then

  1. In the site content type mark a column as hidden.

Column is no longer visible in the list settings dialog an ist hidden in views and forms.

  1. Make column "optional" (not hidden) in site content type again.

Column is visible in views and forms but not included in search index / search results. (As used by CSWP). And the column is also not listed among the list columns in the list settings dialog and the list content type.

When looking at the content types and columns via powershell it shows that the column is still correctly linked and everything, but the property Hidden of the list's Field was still true. Sadly the property CanToggleHidden also was falseI had to use the reflection snippet by Anatoly Mironov to properly show the column again:

$web = Get-SPWeb http://MyWeb
$list = $web.Lists["MyList"]
$field = $list.Fields.GetFieldByInternalName("MyField")
$type = $field.GetType()
$mi = $type.GetMethod("SetFieldBoolValue",[System.Reflection.BindingFlags]$([System.Reflection.BindingFlags]::NonPublic -bor [System.Reflection.BindingFlags]::Instance))
$mi.Invoke($field, @("CanToggleHidden",$true))
$field.Hidden=$false
$field.Update()
  • As I don't have access to PowerShell, I cannot test this answer. However, these columns had been marked as "hidden" and then changed to "optional." – DeNaeL Sep 7 '17 at 18:42

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.