SharePoint 2013 Multiple KPI Web Parts in one page

The following script solves the problem with endless loading the KPI web parts.
Add a script editor web part on the bottom of the page and paste the script.


function updateStatusLists() {
  $("div[id*='upPanel']").each(function(index){
     if(index >= 1){
      var udpId = this.id;
      var pbId = udpId.replace("__upPanel", "$KpiPostBackEventHandler");
      __doPostBack(pbId,'UpdateId=1');	
    }		
  });
}
$(document).ready(function(){
  $("div[id*='kpiimagediv'] img").each(function(item){
    if(this.src =="http://MySharepointURL/_layouts/15/images/kpiprogressbar.GIF"){
     updateStatusLists();
     return;
    }
  });
});
Advertisements
This entry was posted in SharePoint 2013. Bookmark the permalink.

9 Responses to SharePoint 2013 Multiple KPI Web Parts in one page

  1. Kukdai says:

    it doesn’t work i replaced this https://spark.ferranti.be with my url still not working

  2. Paran says:

    its not working for us. Please advise, I still see the loading gif file for the second kpi webpart

    • Enable “”Display edit toolbar in view mode for the webpart. Check if Actions > Update Values is working. Open developer tools and see via DOM Explorer why doesn’t work. You have to invoke the Update Values.

    • in the source you have to find something like:
      <ie:menuitem id="ctl00_ctl43_g_403855b6_0522_476a_9261_028f3e9f3cf2_KpiIconDefault" type="option" iconSrc="/_layouts/15/images/KPIDefault-0.GIF" onMenuClick="__doPostBack(&#39;ctl00$ctl43$g_403855b6_0522_476a_9261_028f3e9f3cf2$KpiPostBackEventHandler&#39;,&#39;Icon=KpiIconDefault&#39;)" text="Default" menuGroupId="2147483647"></ie:menuitem>

  3. Hellmuth says:

    Hi Nikolay,
    I also have the same issue in SharePoint 2013 and the above code does not seem to change it.
    What I did:
    – Inserted a script editor webpart below the indicator webpart that is not loading automatically;
    – Inserted your code above with an additoinal “” at the beginning and at the end,
    – Changed http://MySharepointURL to my SharePoint URL. I verified that the path to the GIF works and that the GIF actally exists on my SharePoint.

    Is this the correct approach? Or do I need to make further changes to your script before I can use it?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s