How to add a condition to a metric definition

e_wilber
Tera Guru

When you create a field value duration metric, how can you set up a condition so it doesn't trigger on every record in that table? Right now the metric is working for all Cases but we want it to only run when there is a specific category.

2 REPLIES 2

Krushna R Birla
Kilo Sage

Hi @e_wilber 

 

You can use below if condition as below and add your logic so that it will trigger only when category is what you want.

 

if (current.category == "<ADD CATEGORY HERE>") {
    //Add your code here as per requirement
}

 

If this solution resolves your query, kindly mark it as the accepted solution and give it a thumbs up.

 

Best Regards,
Krushna Birla

Hi @e_wilber 

 

If above solution resolves your query, kindly mark it as the accepted solution and give it a thumbs up.

 

Best Regards,
Krushna Birla