Browsed by
Month: May 2016

Find and Replace Formulas in SharePoint Calculated Columns

Find and Replace Formulas in SharePoint Calculated Columns

Something often overlooked during migrations are calculated fields in SharePoint Lists. In lots of tools available, the value of a calculated field migrates correctly from one environment to the next. The problem though, is in one environment this formula may have pointed to a URL or static asset as part of the formula. After this column is migrated the formula is technically correct, just inaccurate in the new SharePoint environment.

Following a migration from SharePoint 2007 to SharePoint 2013, my colleague was looking for a way to update formulas across SharePoint sites which had references to the old domain. He essentially needed a “Find and Replace” function for columns in SharePoint. Now this is not probably the smartest or the best solution to this problem, it is however, a solution.

Powershell Function:

And voila, you have a simple way to find and replace any text value inside of a SharePoint list. While I have only tested this with SharePoint 2013, it should work in SharePoint 2010 and SharePoint 2016 if that’s your thing.

Feel free to post questions or feedback on this article, and improvements if I have botched anything.