Tricky KPI

Forums General discussion Tricky KPI

Viewing 1 reply thread
  • Author
    Posts
    • #25610
      becca
      Participant

      I got a new request from one of my users to add alerts to a tool I made based on multiple fields and the current date. Originally I was thinking I’d use an elaborate calculated column to do a solution like outlined here https://sharepoint.stackexchange.com/questions/204802/status-indicators-on-sharepoint-online but I didn’t realize [Today] isn’t usable in calculated columns. My formula was

      =IF(IF(Weekday([Intake Date])>6,[Intake Date]+41,IF(Weekday([Intake Date])>1,[Intake Date]+42,[Intake Date]+40))<[Event Date],"At-Risk",IF(AND(IF(Weekday([Event Date])>6,[Event Date]+27,IF(Weekday([Event Date])>1,[Event Date]+28,[Event Date]+26))<[Today],OR([Request Type]<>"",[Request Approval Type]="Non-Standard")),"SLA At-Risk",IF(AND(IF(Weekday([Modified Date])>6,[Modified Date]+27,IF(Weekday([Modified Date])>1,[Modified Date]+28, [Modified Date]+26))<[Today],[Event Date]>[Today],"Aging","No Risk")))

      Is there a way to instead of just looking at a certain field to use my conditions for each directly in the “case” sections of the code for the KPI and apply the color coding to the title field in the list view?

    • #25644
      Alexander Bautz
      Keymaster

      When you are using SP 2013 your only real good method for modifying a list view is to use JSLink. I don’t have an example matching your specific request, but I did make a tool to attach a JSLink script to a field in a list back in 2015: https://spjsblog.com/2015/07/19/jslink-add-client-side-rendering-to-a-field/

      Look at the example and see if you can adapt the code to your need.

      You may find some useful snippets here: https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a

      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.