Sharepoint 2010 Calculated Column based on Name field

Allan Bowe picture Allan Bowe · Jul 18, 2012 · Viewed 13.2k times · Source

I need to get around the restriction that prevents the use of the Name column in a calculated column.

I basically need to create a new library column (BeginsWith) which is the first three letters of the value of (Name) - eg turning "analysis_type_dim" into "ana"

This can be done from the Title column but not the Name column (via the UI). I tried creating a looping workflow but Microsoft have disabled this in 2010 :(

Answer

namefieldcleared picture namefieldcleared · Jul 31, 2012

You could create a new colum NameAsText and set the field with a workflow to the value of the field "name". Then you could create a new calculated colum with the formula =mid([NameAsText];1;3) and you will get the first three letters of the "name"-field.