How to change colors of an incident field in the incidents tab under the table view

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to change colors of an incident field in the incidents tab under the table view

L1 Bithead

Hi Everyone,

 

In Cortex XSOAR, do you know how I can change the color of an incident field, such as 'severity,' so that it will display a color per its severity in the Incidents tab under the table view? It should look something like this:

  • If severity = 1, then color the background in red.
  • If severity = 2, then color the background in orange.
  • If severity = 3, then color the background in green."

YMaslovski_0-1703498754490.png

 

Thanks.

 

Yuri.M

 

 

1 accepted solution

Accepted Solutions

L4 Transporter

Hi @YMaslovski ,

 

Unfortunately, it is not possible at the moment.

View solution in original post

6 REPLIES 6

L4 Transporter
inc = demisto.incident()

colors = {
        'Green': '#50C878',
        'Orange': '#FFA500',
        'Red': '#FF6347'
}


if inc['severity'] == 1:
    return_results(CommandResults(readable_output=f"{{{{background-color:{colors['Red']};font-size:50px}}}}({inc['severity']})"))
if inc['severity'] == 2:
   return_results(CommandResults(readable_output=f"{{{{background-color:{colors['Orange']};font-size:50px}}}}({inc['severity']})"))
if inc['severity'] == 3:
  return_results(CommandResults(readable_output=f"{{{{background-color:{colors['Green']};font-size:50px}}}}({inc['severity']})"))

L1 Bithead

Hi gyldz,

It doesn't seem to be working

I have tried tagging this field with field-change-triggered but nothing happen.

 

Did it work on your system?

 

 

Hi,

 

Somehow my text has been removed. You can achieve this by dynamic section. Please add general purpose dynamic section to your layout and add this script as a source.

L1 Bithead

Hi gyldz,

It does work as a dynamic field inside an incident  but I don't have the option to see it in the main incidents tab as a column
and that is what I am looking for.

 

is this possible?

L4 Transporter

Hi @YMaslovski ,

 

Unfortunately, it is not possible at the moment.

L1 Bithead

Hi gyldz,

 

Thanks fr your help!

 

  • 1 accepted solution
  • 1644 Views
  • 6 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!