Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Create report on SLA

Vishal40
Tera Contributor

Hello Developers,

I wanted to create a bar chart report which will show " Number of tickets in Priority 1 , Priority 2 , Priority 3...based on SLA Achieved and SLA Breached. Screenshot attached.

e.g. SLA Achieved Priority 1 tickets are 10 , SLA Breached Priority 1 Tickets are 2

SLA Achieved Priority 2 tickets are 7 , SLA Breached Priority 2 Tickets are 1

SLA Achieved Priority 3 tickets are 11 , SLA Breached Priority 2 Tickets are 3....

Kindly help me with your expert advice. Thanks In Advance.

 

 

1 ACCEPTED SOLUTION

Hi @Vishal ,

 

You can change the label of Y-axis like below:-

find_real_file.png

You can't directly change the true/false to any other label. But there is one workaround you can create 2 custom fields on task SLA and change their values as per has breached field and use that fields in the report like below:- You can write BR for that

On Before Insert and Update  


if(current.has_breached=='true'){   //verify backend name for breached.
current.u_has_breached_string="SLA Breached"; //set custom field value based on has breached field.

}
else{
current.u_has_breached_string="SLA Achived";  // Custom field
}
}  

 

 

Please mark my answer as helpful/correct if it resolves your query.

 

Regards,

Gunjan Kiratkar

Consultant - ServiceNow, Cloudaction

Rising Star 2022

 

 

 

 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

View solution in original post

6 REPLIES 6

Hi @Vishal ,

 

You can change the label of Y-axis like below:-

find_real_file.png

You can't directly change the true/false to any other label. But there is one workaround you can create 2 custom fields on task SLA and change their values as per has breached field and use that fields in the report like below:- You can write BR for that

On Before Insert and Update  


if(current.has_breached=='true'){   //verify backend name for breached.
current.u_has_breached_string="SLA Breached"; //set custom field value based on has breached field.

}
else{
current.u_has_breached_string="SLA Achived";  // Custom field
}
}  

 

 

Please mark my answer as helpful/correct if it resolves your query.

 

Regards,

Gunjan Kiratkar

Consultant - ServiceNow, Cloudaction

Rising Star 2022

 

 

 

 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Vishal40
Tera Contributor

Thanks Sir, resolved my issue.