Calculating default values on SharePoint columns

When working in SharePoint, columns are used to display the information that constitutes each item in a list or library. At the top of each column is the name of the column. One of the features you have with setting default values in a column is to use a calculated column – this can be a great little feature to know about to help save time for users when they are inputting values into forms.

Calculated columns display the results of mathematical or logical operations. A calculated column enables you to also perform operations on data in any other column. And the columns need not be side-by-side or even next to the calculated column. So for example if you wanted to add the total of 2 columns you would use a formula such as:

[column 1] + [column 2].

This is simply placed in the calculated column definition.

You can also combine the text in the first two columns by entering the following formula for the calculated column:

[Family Name] & ", " & [First Name]

Which would give you a result as a default for that field as ‘Cherry, Clinton’ if it were me.

So if I wanted to create a title for a document based on today’s date (ie "Clinton List Item – 12-5-2007") then I would simply use a calculated value for the column which would look something like:

="Clinton List Item – "&TEXT(Today,"dd-mm-yyyy")

There is a Microsoft article on how to do this here. Better still, I always find examples are a great start, and there are some great examples here on the Microsoft site.

This entry was posted in SharePoint. Bookmark the permalink.

Leave a comment