Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Using calculated columns in content types

  Asked By: Jonah    Date: Sep 26    Category: MOSS    Views: 6279

I'm creating new content types for my MOSS site.
To begin with, I made two new columns: Date Today and Current Year
(calculated column). Date Today is just the current date. Current Year
attempts to grab only the year from Date Today. The calculation that
I'm using to grab the year is this (single line of text):

=TEXT(YEAR([Date Today]),"000")

I've also tried a number of other calculations (based on a Date/Time
data type), which "seem" to work. The problem is when I add Current
Year to my new content type, I receive the following error:

"The formula refers to a column that does not exist. Check the formula
for spelling mistakes or change the non-existing column to an existing
column."

It seems like whatever the calculation is, I get this same error. My
content type accepts the column only when it's a non-calculated column.
For example, if Current Year was based on a Choice data type, it works
fine.

Has anyone tried to include a calculated column in a content type?

Share: 

 

7 Answers Found

 
Answer #1    Answered By: Kylie Gill     Answered On: Sep 26

Did you add  the Date Today column  to the Content Type prior to adding
the Current Year column?

 
Answer #2    Answered By: Brianna Olson     Answered On: Sep 26

I added [Date Today] afterwards, not prior to. Plus, the [Date Today]
column is last in the content  type's order of columns. Do either of
these facts matter?

 
Answer #3    Answered By: Allyson Burgess     Answered On: Sep 26

That's why you are getting your error. The Date Today column  has to
exist in the content  type to be used in a calculation  of another column.
Add it prior to adding the calculated  column and then just change  the
order of the columns  in the content type  after they are both added. I
suspect that will work.

 
Answer #4    Answered By: Anila Bhuva     Answered On: Sep 26

That allowed me to add  [Current
Year] to the content  type. And I was able to associate that content
type with a particular doc lib. But when I launch a new file (in this
case, Excel) from that doc lib, shouldn't I see Current Year as one
of the document properties? Several of the other columns  of the
content type  appear, but not my calculated  column. I know that the
column works because I can add it to a view on the SP list of
documents.

 
Answer #5    Answered By: Elaine Mack     Answered On: Sep 26

I haven't checked it out, but I don't think you will see it because it
is calculated. The reason the properties show up in Excel is so that
you can change  them. You can't change a calculated  column since its
generated automatically. You may or may not be able to use it in the
document, but I wouldn't expect it to show in the properties panel.

 
Answer #6    Answered By: Baiju Hoskeri     Answered On: Sep 26

That makes sense. I'm not thrilled with the functionality, but it
makes sense. I was using a calculated  column so that I could provide
a default value that I wouldn't have to periodically update. If, in
your dealings with this topic, you are able to make a calculated
value appear in the document properties, let me know.

 
Answer #7    Answered By: Kristy Hicks     Answered On: Sep 26

Save the Excel document and then re-open it andsee if the [Current
Year] shows up. I'm guessing that the field doesn't get calculated
until the document is created.

 
Didn't find what you were looking for? Find more on Using calculated columns in content types Or get search suggestion and latest updates.




Tagged: