none
Set a Calculated column as hidden in a content type

    Question

  • 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?

    Friday, July 2, 2010 10:08 AM

Answers

  • Paula,

    1/ Open SharePoint Designer 2010.
    2/ Open the website that contains your list with the calculated column.
    3/ Click on "Lists and Libraries" in the left column (under Site Objects).
    4/ On the right, click on the list that contains your calculated column.
    5/ Under "Content Types", click on the content type where you want to hide the calculated column
    6/ In the content type screen, click "Edit content type columns" under "Customization
    7/ In the column "Property", try clicking a few times on the "Optional" value until it changes into a dropdown list.
    8/ Select "Hidden" from the dropdown list.
    9/ Save your changes.

    Even though it's greyed out, it should pop up a dropdown list where you can select "Hidden".
    It can take a few clicks, before this dropdown appears, the GUI seems to be a bit slow in that step.

    • Marked as answer by kurtvd Monday, August 20, 2012 8:13 AM
    Monday, August 20, 2012 8:12 AM
  • Hi,

    I ran into this issue tonight and have a non code solution.

    You can change the property of a calculated column to be hidden via SharePoint Designer. To do so, open the site, navigate to the content type you want to change, choose 'Edit Content Type Columns' and select the Property required. Finally don't forget to push the changes to sites and lists and finally click on save.

    Alex.


    Alex Burton
    www.epmsource.com | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    • Proposed as answer by Daniel Barelli Wednesday, December 7, 2011 2:34 PM
    • Unproposed as answer by kurtvd Tuesday, May 15, 2012 11:36 AM
    • Marked as answer by kurtvd Monday, August 20, 2012 8:13 AM
    Monday, September 6, 2010 11:30 AM

All replies

  • I don't have any problems with getting the calculated field displayed, I want it to be hidden so it won't be displayed on the DispForm.aspx.

    I know I can customize the form and remove the field with SharePoint Designer, but I could set it to hidden in SP2007 so I don't see any reason to customize the form for something that was possible in a previous version already.


    Why did this change in SP2010 making it impossible to set it to hidden using the out of the box interface without doing customizing?

    Friday, July 2, 2010 11:58 AM
  • Change the hidden property of the field in code.


    MCPD (PRO: Designing and Developing Web-based Applications by Using the Microsoft® .NET Framework 2.0) MCTS (MOSS 2007 - Application Development) MyBlogs
    Friday, July 2, 2010 3:15 PM
  • You can try to hide it via SharePoint Manager
    Friday, July 2, 2010 3:40 PM
  • Yes I can change it through code, or with SPM, but that requires access to the SharePoint Server which I don't have.

    It solves the problem, but it doesn't explain that it is not possible to do this simply through the web interface of SharePoint ?
    It was possible in SP2007, then why it is not anymore in SP2010?

    It cannot be that every user that likes to hide a column should come to the development team so they can run the SPM tool or a custom tool that hides the column through code? Users are used to the fact that they can do this through the web interface and they don't want to come to the dev team every 5mins to hide some column...

    So is there really no other way than using other tools to achieve this ? Is it something that Microsoft overlooked, or is there a good reason for making this impossible in the 2010 version ?

    Monday, July 5, 2010 7:31 AM
  • Hi,

    I ran into this issue tonight and have a non code solution.

    You can change the property of a calculated column to be hidden via SharePoint Designer. To do so, open the site, navigate to the content type you want to change, choose 'Edit Content Type Columns' and select the Property required. Finally don't forget to push the changes to sites and lists and finally click on save.

    Alex.


    Alex Burton
    www.epmsource.com | Twitter
    Project Server TechCenter | Project Developer Center | Project Server Help | Project Product Page
    • Proposed as answer by Daniel Barelli Wednesday, December 7, 2011 2:34 PM
    • Unproposed as answer by kurtvd Tuesday, May 15, 2012 11:36 AM
    • Marked as answer by kurtvd Monday, August 20, 2012 8:13 AM
    Monday, September 6, 2010 11:30 AM
  • I completely agree with kurtvd.

    As far as I'm concerned it's a bug unless somebody has a tidy way to do it that doesn't involve code or Sharepoint Designer.

    Denis

    Wednesday, September 7, 2011 1:53 AM
  • Hello,

    I agree with kurtvd as well.

    I've encountered the same thing today. Multiple calculated columns where the "column settings" options are grayed out and default to "Optional."

    These are columns that hold formulas based on actual required columns and then are used by workflows - They NEED to be hidden from View, Edit, and New forms. The fact that they can not through the UI makes NO sense.

    If this functionality was removed in 2010 why is it still visible as an option for the column?

    If this is a bug why is there nothing about it other then scattered complaints and then comments about how it's "by design" and we can work around it by digging into the code or breaking out SPD? 

    If this is a matter of user error, I think at least a few people would really love to know what they are doing wrong. I know I would!. :)

    Any real guidance on this issue would be appreciated.

    (As an aside: Alex's suggestion is by far the simplest. SPD works. Click on the property drop down for your column and set it to hidden (or whatever).) But it still doesn't touch on the "why" of this issue.

    • Edited by IsiaMaria Friday, November 18, 2011 6:56 AM
    Friday, November 18, 2011 6:36 AM
  • Hi IsiaMaria,

    Did you get the answer for your Question?

    I too stuck in the same issue and not able to find the exact reason why the options are grayed out and default to "Optional" in the content type.

    Regards,

    DBO046

    Tuesday, May 15, 2012 11:31 AM
  • Alex,

    I am new to desiging solutions and I tried your solution as described.  I opened the list in designer and chose the Item content type which is where my calculated column resides.  However, it still doesn't let me access the calculated column.  It is completed greyed out.  What am I doing wrong?

    Paula

    Tuesday, August 14, 2012 6:17 PM
  • Paula,

    1/ Open SharePoint Designer 2010.
    2/ Open the website that contains your list with the calculated column.
    3/ Click on "Lists and Libraries" in the left column (under Site Objects).
    4/ On the right, click on the list that contains your calculated column.
    5/ Under "Content Types", click on the content type where you want to hide the calculated column
    6/ In the content type screen, click "Edit content type columns" under "Customization
    7/ In the column "Property", try clicking a few times on the "Optional" value until it changes into a dropdown list.
    8/ Select "Hidden" from the dropdown list.
    9/ Save your changes.

    Even though it's greyed out, it should pop up a dropdown list where you can select "Hidden".
    It can take a few clicks, before this dropdown appears, the GUI seems to be a bit slow in that step.

    • Marked as answer by kurtvd Monday, August 20, 2012 8:13 AM
    Monday, August 20, 2012 8:12 AM
  • Kurtvd, Thank you.  Not sure why those fields are greyed out and trying to be tricky.
    Tuesday, September 18, 2012 8:39 PM
  • Thanks kurtvd

    I have been searching for an answer that I understood all day and came across your step-by-step solution.  I am not highly proficient with SharePoint Designer but your answer was easy to follow and worked.

    Thanks

    Peter

    Wednesday, September 4, 2013 6:18 AM
  •  "clicking a few times on the "Optional" value until it changes into a dropdown list." - can't believe it worked - bug for sure...

    Wednesday, September 25, 2013 9:22 PM
  • EXACTLY what I was looking for!!!!!  What a crazy roundabout way to set calculated columns to hidden.  I NEVER would have figured that one out!

    Betty Stolwyk

    Thursday, September 4, 2014 11:52 PM
  • This worked (Office 365/SPD 2013)!  But it was a little tricky to get the drop down to show up.  Had to slide the cursor off of the value after clicking on it and then slide it back to value and then the dropdown would show up.
    • Edited by johnmark1 Thursday, February 5, 2015 9:59 PM
    Thursday, February 5, 2015 9:58 PM
  • This almost looks like it will work but it doesn't. I can go and set it to hidden, but when i try to save and push the changes to the server it complains saying "The column already exists in the list. Choose a different column"

    I have other generic content types where I was able to hide this calculated column using the above method. But some of my content types cannot get hidden due to the error. Any idea how to get around this? 

    Monday, February 23, 2015 6:25 PM
  • thanks Paula worked like a charm :)
    Tuesday, July 24, 2018 10:24 AM
  • It is now 2019, 7 years AFTER this answer was posted, and the same thing is happening in SP2016! The only thing I had to do different from the above answer was click rather slowly, several times, until the property was editable. I think we can give up asking if Microsoft can please allow us to hide a calculated field for a content type in the UI. Clearly, that is not going to happen. 

    Kim Ryan, SharePoint Consultant kryan@[no spam]spscholar.com

    Monday, May 20, 2019 12:58 PM