Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Ok so I have a List and it has a Description column, the one that is default and I cannot delete it. The problem is that the Description field will show up when you are creating a list item but when you view a list item (by clicking on it in the list) the description is not there...any idea why this is? I don't think it has to do with the view since that does not dictate whether it should appear in the form that opens up to when you view the item. I am totally confused by this...

EDIT: I have the solution from the comment with this code:

$web = Get-SPWeb http://server/subsite
$list = $web.GetList("subsite/Lists/My List")
$field = $list.Fields.GetFieldByInternalName("Description")
$field.Hidden = $false
$field.Update()

EDIT 2.0: Ok I got a little futher but now I get this error:

Exception calling "GetFieldByInternalName" with "1" argument    (s): "Column 'Description'    does not exist. It may have been deleted by another user.  /company/Lists/My List"

I'm confused, why does it say its been deleted when I can see the description column in the list settings?

EDIT 3.0: Ok after some searching I got rid of all errors but the column is still not displayed, its only visible if you edit the list item but not if you just click it to display.

$web = Get-SPWeb http://sharepoint/company
$list = $web.GetList("/company/Lists/My List")
$field = $list.Fields["Description"]

$field.Hidden = $false
$field.ShowInDisplayForm = $true
$field.ShowInViewForms = $true

$field.Update()
$list.Update()
$web.Dispose()

Any ideas? I really need to get this working and am totally stumped why its not working.

share|improve this question

2 Answers 2

up vote 0 down vote accepted

OK figured it out, this code works in my case for any column other than the Description. Turns out that column is a renamed column out of the two default ones so I don't think I can show it on the display form.

$web = Get-SPWeb http://sharepoint/company
$list = $web.GetList("/company/Lists/Agenda Items")
$field = $list.Fields["Item Description"]

$field.Hidden = $true
$field.ShowInDisplayForm = $true
$field.ShowInViewForms = $true

$field.Update()
$list.Update()
$web.Dispose()
share|improve this answer

If you have sharepoint manager (found on codeplex) then you can determine whether this column is hidden or not. I think there is a powershell command to find this info. Hope this helps. How do I unhide hidden column in SharePoint 2010?

$web = Get-SPWeb http://server
$list = $web.GetList("/Lists/Test")
$field = $list.Fields.GetFieldByInternalName("Created")
$field.Hidden = $false
$field.Update()
share|improve this answer
    
Thanks! I gave that a try in powershell but I am having alot of issues getting it to work, any ideas what it could be? I pasted my code and comments/errors in the original message above... –  Tudor Sep 17 '12 at 16:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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