<img height="1" width="1" src="https://www.facebook.com/tr?id=730305433807073&amp;ev=PageView &amp;noscript=1">
Book a Demo

Advent Calendar Door 13: Turn any SharePoint field into a calculated field

Turn any SharePoint field into a calculated field

Capabilities and limitations of the standard SharePoint calculated fields are well known, and all SharePoint developers and solution creators learned to live with them. But, imagine if we could turn *any* SharePoint field into a calculated field, regardless of the field type, and complexity of the calculation? Store a dynamically generated HTML code in a Multiline text (Note) field? Check.

Complex math calculations in numeric fields? Check. Any kind of date-time fiddling with the date fields? Check. Dynamically populate users in the User field? Dynamically set metadata field? Of course. And we could go on like this as long as we want. Because it is all possible with skybow Solution Studio.  

  1. Open the list where the desired calculated field is stored
  2. Go to “Things in Background” => Field settings icon => “Values” tab
  3. Choose the “fx Expression” calculated type, and create calculated field expression, as simple, or as complex as you need, with skybow Expression Builder.

Expression Builder skybow Solution Studio.png

In the case in the screenshot above, we are creating a dynamically formatted Multiline Text field which shows an icon and basic item data in a nicely styled format.

Please note that you should exclude the calculated fields from new and edit forms. If you leave them there, and user changes their value through custom input, it will have no impact since the field value will be overwritten asynchronously immediately upon saving, and user will probably be confused by the result.

Tip: if you would still like to include those fields in new and edit form, just for the presentation purposes, make them read only, and copy the same calculation formula from “things in background” into the field calculated value in the form itself. That way, user will get the effect of the calculated value being “recalculated” on the fly (as the values of the other fields are entered), and we will have no consistency issues, since the value displayed dynamically will be the same as the one recalculated in the background.


Adis Jugo

Written by Adis Jugo

is Director of Product Technology at skybow, and a software architect with over 20 years of experience. Adis is double Microsoft MVP (Most Valuable Professional) for Office Development and for Office Servers and Services. He first met SharePoint (and Microsoft CMS server) back in 2002, and since 2006 his focus was completely shifted towards architecture and development of productivity solutions, now based on the Azure, Office 365 and SharePoint technologies. Adis is an internationally recognized speaker with over 15 years of speaker experience, speaking at various Microsoft, Community and SharePoint/Office 365/Azure conferences worldwide.