Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I would like to create a calculated value for the mandatory Title field:

<username, created by> - DD-MM-YYYY

That is I want the title to be filled in with the user name (the user that creates the item) and the date (for creation). Can this be done automatically and if so, what should I put in the field below the "calculated field" radio button. If this cannot be done this way, I can use a workflow to set the value, but what should be the choice of workflow?

(sorry if the naming is a little off target I'm not working with an english version of SharePoint).

share|improve this question
add comment

2 Answers 2

up vote 9 down vote accepted

Just to be clear: title is only "mandatory" if you create lists using the GUI. When you provision your own list using code or CAML you can create lists without Title.

If you insert the formula

=Me&" - "&TEXT(Today,"dd-mm-yyyy")

into your calculated value, you should get something close to what you want.

Be aware though that at any time the user can insert something else into the field.

To get around this, you could either create the list from scratch and hide the site column or insert the value using an event handler in the ItemUpdated event (more on event handlers)

share|improve this answer
1  
I am aware that this is UI behaviour that the Title is mandatory. I also know that users can change the content, but it's just to give them something meaningful in the field so the don't have to write something :o) –  noesgard Jan 13 '10 at 9:49
add comment

You may want to rethink this approach for creating a title. The typical guidelines for document metadata recommend keeping each metadata column/field focused on a single specific type of information. This approach provides much better searching and document management functionality.

share|improve this answer
    
The title in this case is not important, serves only as a link to edit the information. As you can see with the choice of data, all information is accessible elsewhere in the list. I will filter data based on the user, but using the "Created" column, not the title. –  noesgard Jan 13 '10 at 13:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.