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

Advent Calendar Door 11: Creating KPIs in SharePoint Lists.

avatar

Posted by Adis Jugo - 11 Dezember, 2017

Creating KPIs in SharePoint Lists

Now, here is an evergreen, a holy grail of all SharePoint requirements in today’s skybow Advent Calendar: KPIs. They can be found in each and any SharePoint project at some point of time: a nice, custom icon, representing the current state of the list item. It can vary from the simple green-yellow-red status field, to some very complex status indicators. Since SharePoint has never really delivered this functionality out of the box, in traditional development it almost always meant either fiddling with a lot of JavaScript (client side) or even writing event receivers to get it done server side (on-prem).

To achieve this with skybow Solution Studio, it is actually almost immorally simple.

  1. Upload the KPI icons you want to use to any SharePoint library in your site
  2. Select the list or library where you want to have a KPI-like field
  3. Create a picture field in that list (not hyperlink, really, a picture field)
  4. Go to “Things in background” => Field settings => Values, for that newly created field
  5. Select the “fx Expression” as Calculated Value type
  6. In the Expression field, use any expression to return the exact path to the KPI icon you want to show 

cahnge colums values.png

Those expressions can be very simple ones, such as:

[[amount]] > 10 ? "/sites/sitename/SiteAssets/green.png" : "/sites/sitename/SiteAssets/red.png"

The expression above (should be of “assignment type”) will just set a green or red icon in the picture field, depending on the value of the “amount” field in that list. As you see, we have created a fully functional KPI indicator, based on read field data (the “amount” field), within seconds!

The expression on the next screenshot is somewhat more complicated (and uses “Function code” expression type), but it gives you way more flexibility to create your KPIs., just the way you want it to be.

In this case, we want to show the status of a Purchase Order as a KPI icon. Based on other list data, out purchase order can be “Submitted”, “In process”, “Placed” or “Received”:

expression Builder calculated expression.png

And that’s basically it – development time is under 5 minutes, and your KPIs are in place, where you want them to be!

Topics: Office 365, Sharepoint, SharePoint Online, SharePoint List


Recent Posts

Business Apps on Office 365 and Teams are the next big thing

read more

The real digital workplace

read more

A personal letter to all Microsoft Cloud Solution Providers

read more