Color coding/Add text to the Parent Incident Column in List View

Chris Armstron2
Giga Expert

Hi,

I am in the process of attempting to either add color coding or some verbiage/text that says "Parent Ticket", in the'Parent Incident' fields, within the incident list view...if the ticket is a Parent.

I've tried going to Field Styles and have tried a number of variations similar to:

find_real_file.png

Has anyone had any luck with adding field highlighting/color coding to the parent incident field, or perhaps some text?

Thanks,

Chris A.

1 ACCEPTED SOLUTION

Jim Coyne
Kilo Patron

Another way of doing it would be to create a new Calculated field called "Parent/Child".  Using the following script, it would return an empty string, "Parent", "Child" or "Parent and Child":

(function calculatedFieldValue(current) {
	var answer = [];
	if (current.child_incidents > 0) {
		answer.push("Parent");
	}
	if (!current.parent_incident.nil()){
		answer.push("Child");
	}

	return answer.join(" and ");
})(current);

This would be the result:

find_real_file.png

That might be better, as there would be no question about the result, instead of having to remember what that gray dot meant.

View solution in original post

9 REPLIES 9

Ahmmed Ali
Mega Sage

Hello,

 

I was able to achieve it as below.

find_real_file.png

find_real_file.png

 

Thanks,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

Jim Coyne
Kilo Patron

It would make more sense to highlight the "Number" field because "Parent Incident" is only populated on the child and not the parent record: 

find_real_file.png

Using the following Style:

find_real_file.png

Does it really worked by you out ? By me its failing 

find_real_file.png

Jim Coyne
Kilo Patron

Another way of doing it would be to create a new Calculated field called "Parent/Child".  Using the following script, it would return an empty string, "Parent", "Child" or "Parent and Child":

(function calculatedFieldValue(current) {
	var answer = [];
	if (current.child_incidents > 0) {
		answer.push("Parent");
	}
	if (!current.parent_incident.nil()){
		answer.push("Child");
	}

	return answer.join(" and ");
})(current);

This would be the result:

find_real_file.png

That might be better, as there would be no question about the result, instead of having to remember what that gray dot meant.