.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Set a Calculated column as hidden in a content type

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :SharePoint
Hello, I'm building a custom list with several columns, including a Calculated column. This calculated column simply takes the value of a choice column in the same list to convert this value to a single line of text value. I do this because when adding a lookup column to this list, I cannot select Choice columns as additional columns, but I can add the calculated column. Speaks for itself that this calculated column only needs to exist in the background, and end users should not see this column in the Add/Edit/Display forms. In add/edit forms the column is not displayed, but in the display form it gets displayed. Piece of cake I thought, I'll just set it as hidden in the content type used for the list. When I open the column the column settings (required/optional/hidden) is grayed out, so I cannot set it to hidden. In SP2007 this was possible, why can't I do this anymore in SP2010? Do I miss some feature in order to do this, or is there a good reason why this seems to have changed in SP2010?

View Complete Post

More Related Resource Links

using [content type] in calculated column

I want to get the content type in the calculated column. [content type] is available in Moss not able to use that in 2010. Any idea?

Insert Image column in External content type

Hi,   I've created an external content type. It pulls in data from SQL Server Database. I need to have the first column as an image based on the value of one of the columns. Could anyone please suggest how to add a column so represent an image in external list.   Regards, Zia

Calculated column and hyperlink field type

Hi I have customer who is asking me if this is possible to provide filter based on the HyperLink field, where he could easly limit results to only those items where link field is filled. As filtering on hyperlink column type is not supported I was thinking to buld some calculated field based on it to return YES (if link is provided) or NO (if link is not provided). The problem is that hyperlink field type is not avialiable on the list of field to be used on calculated field. is there some workaround for that ? thanks for help   Mariusz Gorzoch Blog : http://mariusz.gorzoch.pl Twitter : http://twitter.com/MariuszGorzoch Facebook: http://www.facebook.com/mariusz.gorzoch

Is there any way to populate an InfoPath form field with the data from the site content type column?


I have a Form library with a form template.

The templat has a field "Office name" which should not be a fixed list of values, but a dynamical list, feeded from a different type of form. I'm a novice with InfoPath - Sharepoint and I want to find out, how can I can give users a possibility to create and maintain a list of offices and also have this list as a selection list inside main library form - ALL inside one library, if possible.

I assumed that if I publish main form (Itinerary) as a library template form and lookup form (OfficeInfo) as a SiteContent, I should be able somehow to connect to siteContent column and it's information. But I cannot see how - Site Content Gallery is not appering as a Connection item.

Can I use SiteConenct for this purpose or there are other ways to create end-user lookup lists?

Thank you!


Unable to set "column settings" of Yes/No (Check Box) values "Required, Optional, Hidden" of content


Hi, SharePoint 2010 and I have created a number of site columns of type Yes/No (check box). I have created a number of content types and used these column types but when I try to change the column setting within the content type to "Required, Optional or Hidden" I am unable as the settings are greyed out and I am unable to change them.

Even in the Parent content type I am unable to change this particular type of column value so it isn't an inheritence setting as it's the parent content type. Am I doing something wrong?  

Note - I am recreating a list from a SharePoint 2007 site and I am able to change the setting here, have i configured this incorrectly or was this something that could be done in SP 2007 but not SP 2010.

Thanks fo any help.

Cannot delete certain site column(s) from new content type



I make a new content type, based of event.

If I add the (existing) site columns, Active, Aliases, Article Date, Byline (and some others?), these columns cannot be deleted afterwards!

is there a workaround ? 

Thank you 

P.S. After testing, this also happens in 2007.



ListData.svc fails if list has calculated column with Yes/No (boolean) return type


I have a list with a calculated column whose return type is Yes/No.  If I try to browse to the list or a list item using REST via ListData.svc, I get the error "An error occurred while processing this request".  Can't seem to find anything in 14\LOGS or the System or Application event logs.  I've tried multiple calculation formulas such as:



Both display "Yes" when viewing through the SharePoint UI and are sortable and filterable.  If I change the calculated column return type to anything else (single line of text, currency, date/time, etc.) and update the formula as necessary, ListData.svc displays the list item XML as expected.  If I replace the calculated column with a regular column whose type is Yes/No, ListData.svc displays the list item XML as expected.

Is this a known bug?  Is there a workaround (other than manually casting to bool in my code)?

Remove Column from List Content Type


I have a list that inherits from 2 site content type.  When I added the "site content types" to my list it created a "copy" of it in my "List Content Type". 

Then I created a new column directly into my list, and at the bottom of the column creation screen there is a checkbox saying "Add to all content types" that was checked by mistake (I dont want the List Content types to have the column).

Now, is there a way I can remove those columns from the "List Content Type"? 

I saw that I can delete the "List content type" and re-link to the "Site content type", but I would need to delete all of my items before doing that, and I want to avoid that.



Content Type or Lists Lookup Column can't show additional fields which are Choice or lookup columns


I am trying to create some content types, but this also happens when creating new columns in a list.

Ok, here is my setup (which is the most basic way to replicate the issue):

List 1: Department List
Columns: Department Name (Single Line of Text)

List 2: Document Owners
Columns: Document Owner (single line of text), Department (Choice or Lookup from Department List), Email (single line of text), Lookup Field (Calculated).

Content Type: Quality Document
Columns: File Name, Title, Document Owners (Lookup from Document Owners List), Email (pulled in with Document Owner), Then i want to also pull in Department from the Document Owners list.

That is where my problem is.  When i select the Document Owners List as the list to get the information from, there isn't the option under "Add a column to show each of these additional fields" to pull in the Department column.  This occurs if i use a Choice in the Document Owners list, or if i do a lookup from the Department List.

My preferred method of implementing this system would be to have a multi-value lookup field in the Department List for Document Owners so that the Owners are attached to the Department, and if the owners change for the department they also change for the document that is for said department.  But, i run into the same issue that i c

Site content type's column with wrong field type that was created once will not work if re-created


I've created the column 'MyDescription' with type 'Multiline Enchanced Text' in my custom content type derived from 'Page'. But later I understood that 'Publishing HTML' is better for me. I've removed the 'MyDescription' column and recreated 'MyDescription' with type 'Publishing HTML'.

Page layout for my custom content type uses this code to display field

<PublishingWebControls:RichHtmlField FieldName="MyDescription" runat="server"/>

But page falls without any error information. I've deleted and recreated page: it fell always.

When I created column 'MyDescription1' with 'Publishing HTML' type in my custom content type and changed code to this


Delete Description Column from Content Type

Hello, I'm using SharePoint 2010 Server. I created a custom content type named Publication. After configuring several columns for this content type, I accidentally added a column named Description, found under the Document and Record Management Columns. I do not want this column to be in this content type and cannot find a way to remove it from the Publication content type. There is no delete button and my searches on the Internet been in vain. I don't want to delete the Description column from SharePoint. I simply want to delete the column from the content type Publication. How can I do this?

MultiLine site column in content type is displayed as NoteField in SPD2010



Problem: When I create a new page layout in SPD2010 based on a custom content type a MultiLine Site column is displayed as:

<SharePointWebControls:NoteField FieldName="6d38fdd6-c4a2-40a0-8da7-8dae477b653e" runat="server"></SharePointWebControls:NoteField>

The user is, of course, not able to add Richt text to it!

Question: I need it to be a RichtTex

Assigning External content type field column value using Client Object Model


I have a problem assinging External column value to ListItem object with client object model-based application I'm developing. To be precise, I am able to retrieve data related to external content type by reading external list created from this content type but I don't know how to properly use it to assign value to this field. By doing some research on my own I concluded that BDC ID column from external list is the way to go since it uniquely defines selected row from external list but that doesn't tell me much since I don't know what to do with it. Currently I ended up with partial solution - to assign plain string value of picker column but that makes this value visible only in "View Properties" option on Sharepoint and not in "Edit Properties" which pritty much makes sence since it isn't properly related to rest of the data in specific row. Does someone have a better solution for this?

Igor S.

Bug: Does not change column type from nvarchar to ntext


Scenario: If you create a table with a column of type nvarchar, populate it with some content and try to modify it using the WebMatrix editor, from nvarchar to ntext, it does not display any error message or warning that this is not possible. It silently saves and reverts the change, back to nvarchar. Wasted some hours on this issue as I thought my column was ntext, but in fact was still nvarchar.

Expected behavior: It should change to ntext, or if SQL CE doesn't support that, it should notify the user that no change was applied.

WSS 3.0 Content Type with Office 2007


We're currently encoutering an issue on our production servers with Office 2007 documents. In essence, the Content Type for all docx, xslx, and pptx documents cannot be changed away from the site default on all newly created sites.

I've even done some step by step debugging on an SPItem insert and I can set the content type to a custom type, but it reverts back to the site's default Content Type on Update(). Other file types - .doc, .xls, .tif, .txt, and .jpg - have all been tested, and all work as expected (the Content Type changes correctly).

Thanks in advance!


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend