Functions for use in a MOSS 2007 column ([Today] [Me] [Other??])

Following the recent questions from my last post I thought it would be useful to highlight what functions are available when creating a column in a list/library within MOSS 2007. This can be useful when creating a:

  • Calculated column based on other columns within a list/library. For example, to calculate the number of days difference between a list item being Created and Modified.
  • View of a list/library that shows items that meet a certain criteria. For example, a View showing the tasks assigned to me.

Although the [Today] and [Me] functions are well know, other functions are not.

List of functions available

All of the functions available are listed below. I have only tested a sample of these in a MOSS 2007 list, but in theory most/all should work!

To get a more detailed list of the functions available:

  1. Open a MOSS 2007 site.
  2. Create a list.
  3. On the Actions menu, select Edit in Datasheet.

   4.  At the bottom of the list, click the Help hyperlink. This will open a chm file.

    5. In the chm file, expand the Function Reference tree





The chm file may also be found at C:\Program Files\Microsoft Office\Office12\1033\STSLIST.CHM.

Example use of a function

Requirement = calculate the number of days difference between two date columns.

1. Make two date columns, one called Date1 and the other called Date2.

2. Make a third column (e.g. DateCalc) to calculate the difference and ensure the column type is set to Calculated.

3. In the Formula box type =DATEDIF(Date1,Date2,"D")

4. In the The data that is returned from this formula is section, click the Number radio button.
















Result within a MOSS 2007 List: