4.16.2013

InfoPath - Line Breaks on Calculated Values

File this one under A for annoying. However, this work around does work for creating multiline, calculated textbox values without resorting to C# code.
http://blogs.msdn.com/b/infopath/archive/2005/03/04/385577.aspx

4.08.2013

InfoPath 2010 - DateDiff

InfoPath dates are stored in the format YYYY-MM-DD

To extract the day number of a date:
number(substring(field1, 9, 2))

To extract the month number of a date:
number(substring(field1, 6, 2))

To extract the year number of a date:
number(substring(field1, 1, 4))

4.02.2013

SharePoint 2010 - List Column Deletion

This little gem saves me quite a bit of hassle when developing a new content type.

$web = Get-SPWeb https://MYSITECOLLECTION
$list = $web.Lists["PDR"]
$field = $list.Fields["ConfAttendees"]
$field.AllowDeletion = “true”
$field.Sealed = “false”
$field.Delete()
$list.Update()
$web.Dispose()