Re assignment Count Incident Table

Phani Pasupulet
Tera Contributor

In an incident table reassignment count giving the number of times assignment group was changed 

 

 

RaviSankar_2-1689681357916.png

but I want how many times assigned to or configuration item was changed how can I achieve that What should I configure to count the reassignment of those fields

 

1 ACCEPTED SOLUTION

Samaksh Wani
Giga Sage
Giga Sage

Hello @Phani Pasupulet 

 

You can Create 2 fields one for Assigned To Count, Second for Configuration Item count.

 

Write a OnChange Client Script.

 

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
	if (isLoading || newValue == "")
		return;

     var field1 = g_form.getControl('assigned_to');
     var field2 = g_form.getControl('configuration_item');
     var count1=0;
     var count2=0;
 
    if(field1.changed){
         g_form.setValue('assigned_to_count', count1);
     }
     if(field2.changed){
         g_form.setValue('configuration_item_count', count2);
     }

}

 

 

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Samaksh

View solution in original post

4 REPLIES 4

Samaksh Wani
Giga Sage
Giga Sage

Hello @Phani Pasupulet 

 

You can Create 2 fields one for Assigned To Count, Second for Configuration Item count.

 

Write a OnChange Client Script.

 

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
	if (isLoading || newValue == "")
		return;

     var field1 = g_form.getControl('assigned_to');
     var field2 = g_form.getControl('configuration_item');
     var count1=0;
     var count2=0;
 
    if(field1.changed){
         g_form.setValue('assigned_to_count', count1);
     }
     if(field2.changed){
         g_form.setValue('configuration_item_count', count2);
     }

}

 

 

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Samaksh

where we are incrementing the count values

 

Hello @Phani Pasupulet 

 

Sorry plz add 

count1++ in first if

count2++ in second if

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Samaksh

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Phani Pasupulet 

Greetings!!

 

Give a try at metric / metric definitions. HOpe that will solve the purpose.

 

Please mark this response as correct or helpful or then solution accepted if it assisted you with your question.

Regards
Atul G.
Learn N Grow With Atul G

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************