0

I am working on sharepoint server 2013. now i have created multiple site columns using the UI. Now when creating these site columns using the UI i can set if the column if Required or not. but i not not have the ability to set if the column is visible on Edit, view, Create forms, and to get these settings i have to create the site column using power-shell.

so my question is if i create a site column using the UI, can i updated its property such as "ShowInDisplayForm" using powershell later on ? or the site column need to be created using powershell from the beginning to be able to change its "ShowInDisplayForm" or "ShowInEditForm" , etc ??

2

Yes, you can update the property later on if you have already created the filed using UI. The code would be as below:

$list = (Get-SPWeb "http://yoursite").Lists |? {$_.Title -eq "yourlist"}

 $field = $list.Fields["yourfield"]

 $field.ShowInNewForm = $false //$true

 $field.ShowInEditForm = $false //$true

 $field.ShowInDisplayForm = $false //$true

 $field.Update()

There is no dependency on how or using which method you created the column.

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.