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

How can you set the default value for the 'Description' field for a SharePoint 2010 calendar list? There is nothing in the web interface for doing this, so I have tried it with PowerShell.

$w = Get-SPWeb -Identity http://SPSite
$l = $w.Lists["My Calendar"]
$f = $l.Fields["Description"]
$f.DefaultValue = "default value"
$f.Update()

It runs without any exceptions occurring, but does not set the default value.

I want to include some text in the description field that shows when adding a new event via SharePoint or Outlook 2010.

share|improve this question
    
Did @James script on PasteBin help you here? Accepting answers helps motivate people to answer your questions as reputation is awarded. –  Alex Angas Jun 26 '11 at 23:51
add comment

1 Answer

I doubt you'll get the default value to show in Outlook when creating an event. Also, try setting the default value to the Site Column called Description and call Update(true).

share|improve this answer
    
I get an exception if I pass true: $f.Update( <<<< true) + CategoryInfo : ParserError: (CloseParenToken:TokenId) [], ParentContainsErro rRecordException + FullyQualifiedErrorId : MissingEndParenthesisInMethodCall –  Sam May 26 '11 at 16:17
    
I did put the closing bracket in... even using $TRUE instead of true does not work (but prevents the exception from occurring) –  Sam May 26 '11 at 16:20
    
Might need to pass "True". PoSH still evades me to this day :) –  James Love May 26 '11 at 16:22
    
That doesn't help either... –  Sam May 26 '11 at 16:26
1  
This worked for me: pastebin.com/nvXpWC3J –  James Love May 26 '11 at 16:32
show 2 more comments

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.