Calculating Age or Anniversary Years

Ever wanted to calculate someones age or how long they have been with a company?

1. Create a new List.

2. Create a new column, set the type to Date and Time, with the Date and Time Format set to Date Only.

 

3. Create a column and name it Today, data type of Single line of text.

 

4. Create another column and name it Anniversary, type is Calculated (calculation based on other columns), set the data type to Number, and set the decimal place to 0.

The formula is:

=YEAR(Today)-YEAR(HireDate)-IF(OR(MONTH(Today)<MONTH(HireDate),AND(MONTH(Today)=MONTH(HireDate),DAY(Today)<DAY(HireDate))),1,0)

5. Now you want to delete your Today column that you just created (trust me, just try it).

6. Navigate back to your list and try entering a few values.  In my example, Today is equal to 8/18/2011.

Unable to load workflow actions from the server

Roll into work and a coworker alerts me to the fact that our SharePoint 2010 workflows are not flowing.  When I tried to open any workflow, I was receiving this error:
Unable to load workflow actions from the server….

unable to load workflow actions from the server

I cracked open Fiddler, opened SharePoint Designer, then tried to open a workflow.

On the left side of Fiddler, you will see a bunch of actions, look for one line that turns red and click on it.  In the right window, you should see the error.

example:
soap:ServerException of type ‘Microsoft.SharePoint.SoapServer.SoapServerException’ was thrown.Failed to find the XML file at location ‘14\Template\Features\MissingFeature\feature.xml‘0x80131600……..

So I opened one of my WFE servers and navigated to the folder:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\MissingFeature

Sure enough, the feature folder in question was missing. To get the missing feature folder, I opened my app server and copied over the missing folder to my WFE servers. No iisreset needed.

Search Web Part Missing

After setting up a new Search Center, I tried to add the Refinement Panel web part, but was unable to locate it.

Navigate to your Site Collection and enable Search Server Web Parts.

From Microsoft:
To activate the Search Server Web Part feature

To open the Site Settings page for the top-level (root) site of the upgraded site collection, append /_layouts/settings.aspx to the root site’s URL, as follows:

http://RootSiteURL/_layouts/settings.aspx

In the Site Collection Administration section of the Site Settings page, click Site collection features.

For Search Server Web Parts, click Activate.

Link for more detail:
http://msdn.microsoft.com/en-us/library/ff512796.aspx

Copy List from 2007 to 2010

I’m recreating a site in SharePoint 2010 and didn’t want to create each List and Library.

I tried exporting a List from SharePoint 2007, then import into SharePoint 2010. No go.
SharePoint 2010 doesn’t like .STP files.

I opened MS Access 2010, imported my SharePoint 2007 List, then created a new List in my SharePoint 2010 site using imported 2007 List.

Like this:
In Access 2010
External Data tab
In the Import and Link section, click on More, then click on SharePoint List.
Choose the Import the source data…. option.
With your new table open, look in the Export section of External Data tab.
Click on More, click on SharePoint List, when the Export – SharePoint Site box opens, enter your destination URL and List name.
Click OK.

You should now have your List duplicated to your SharePoint 2010 site.

My Site Emails Not Sending

In SharePoint 2010 I noticed I wasn’t receiving updates when people posted stuff on my MySite.

Turns out, my Active Directory Sync is not working, and my email account was not being populated in my User Profile.

Fix it!

Central Administration –> Manage User Profiles
Find the person having the issue.
Update the email address.
Cruise over to the mysite, post a note, look in your inbox for an email.

the language of this installation package is not supported by your system

When trying to install SharePoint Designer 2010 on my PC, I ran into an error saying Designer 2007 was installed on the box.

The problem was, I had SharePoint Designer 2007 installed, and it’s a 32-bit install. When I tried to uninstalled Designer 2007 I was getting this error:

The language of this installation package is not supported by your system

No matter what google-related-fix I tried, I couldn’t uninstall it.

What I did to fix things:
Installed Office 2007
Installed Designer 2007

Uninstalled Desinger 2007
Uninstalled Office 2007

Then I was able to install SharePoint Designer 2010.

Get Content Database Size

In SharePoint 2010 or 2007 I wasn’t able to find the size of the Content Databases.  For some reason I thought it was displayed in Central Administration, wrong.

Log into one of your SharePoint servers.
Open PowerShell and paste the below code into the PowerShell window.
Run.

[Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | out-null
$prop_Name = [Microsoft.SharePoint.Administration.SPContentDatabase].GetProperty("Name")
$prop_DiskSizeRequired = [Microsoft.SharePoint.Administration.SPContentDatabase].GetProperty("DiskSizeRequired")
$prop_Sites = [Microsoft.SharePoint.Administration.SPContentDatabase].GetProperty("Sites")
[Microsoft.SharePoint.Administration.SPFarm]::Local.Services |? {
$_.GetType().FullName -eq "Microsoft.SharePoint.Administration.SPWebService"
} |% {
$_.WebApplications |% {
$_.Name
$_.ContentDatabases |% {
$prop_Name.GetValue($_, $null)
$prop_DiskSizeRequired.GetValue($_, $null) / 1GB
}
}
}

The output will be:
Web App
Content Database Name
Content Database Size in Gigs.

You can change the output displayed size to MB by updating:
$prop_DiskSizeRequired.GetValue($_, $null) / 1GB
$prop_DiskSizeRequired.GetValue($_, $null) / 1MB