Trying to get Red Dot next to Incident in My Work if it is a Parent Incident

Michael Miller
Tera Contributor

I have a field on incident called parent_incident_yn - it is a true/false field.   Everyone is using My Work which is based off the Task table.   They want a red dot to show up next to the incident numbers that have parent incidents.   The research i have found has pointed me to Field Styles with a value using JavaScript.   So I think I am dot-walking this incorrectly.

find_real_file.png

Table: Task         [because that is what My Work uses]

Field name: Number   [that is where they want the red dot to show up]

Value:   javascript:current.incident.u_parent_incident_yn;

I have tried the following in there:

javascript:current.incident.u_parent_incident_yn=="true";

javascript:current.incident.u_parent_incident_yn==true;

javascript:task.incident.u_parent_incident_yn==true;

javascript:incident.u_parent_incident_yn==true;

Im not sure I am even in the right ballpark on this so I am deciding to ask before I spend 4 more hours trying to figure this out - I appreciate any help anyone can provide.   Thanks in advance.

1 ACCEPTED SOLUTION

OK, that's interesting. I just threw your script on my instance and it came out with the class name incident and the numbers, indicating that it retrieved the record.



My field style (BTW, you want to change background to background-color if we ever get the script working)



find_real_file.png



My script (corrected for missing parenthesis in that if statement to get the record)



find_real_file.png


View solution in original post

14 REPLIES 14

Let me try to reproduce on my end. Stand by...


OK, that's interesting. I just threw your script on my instance and it came out with the class name incident and the numbers, indicating that it retrieved the record.



My field style (BTW, you want to change background to background-color if we ever get the script working)



find_real_file.png



My script (corrected for missing parenthesis in that if statement to get the record)



find_real_file.png


Just noticed that my field style is on incident.number, yours is task.number... retesting... Still looks right.



find_real_file.png


Thank you Chuck all your help, its working now


Glad you got it work. It was a good challenge!