- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
12-25-2023 02:09 AM
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:
Thanks.
Yuri.M
12-27-2023 11:17 AM
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']})"))
12-28-2023 08:49 AM
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?
12-28-2023 08:56 AM
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.
01-02-2024 09:44 PM
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?
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!