- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
01-24-2024 08:41 AM
Hi all!,
I'm having issues trying to update the incident.Hostnames field.
I'm receiving an alert which involve different hostnamed, for the sake of simplicity and to track easier the incidents we want to add the hostnames to the incidentHostnames field:
As it is an array there shouldn't be any issue but when we perform.
I'm using the setIncident built in Integration
The result of the transformer is the expected an array with two hosts:
But the incident field shows only the first one:
We've also stored the same variable, obtained using the same transformer in a context variable using the Set built in automation:
And the result is as expected:
The expected result is to have in incident.Hostnames the same as we have in popo, an array with both of the hostnames.
That, despite the Incident.Hostnames field is defined as an array, we are not able to update it.
Thanks a lot in advanced!!
BR,
Fer
01-25-2024 02:22 AM - edited 01-25-2024 03:05 AM
Hi there!
It was grabbing both the fields thus the other variable setted worked. But I found the solution and it goes along with your lines.
As per the documentation:
Multi select / Array: Includes two options a) Multi select from a pre-filled list b) An empty array field for the user to add one or more values as a comma-separated list. XSOAR Incident Fields
So not only I need to stringify, I need to append them comma separated!
Thanks a lot,
BR,
Fer
01-24-2024 09:40 AM
Hi,
This is potentially because the Get field transformer is only grabbing the first element of the array. Can you please try adding the StringifyArray transformer after the Get field transformer?
This should resolve the issue and append both of the elements in the hostnames incident field.
01-25-2024 02:22 AM - edited 01-25-2024 03:05 AM
Hi there!
It was grabbing both the fields thus the other variable setted worked. But I found the solution and it goes along with your lines.
As per the documentation:
Multi select / Array: Includes two options a) Multi select from a pre-filled list b) An empty array field for the user to add one or more values as a comma-separated list. XSOAR Incident Fields
So not only I need to stringify, I need to append them comma separated!
Thanks a lot,
BR,
Fer
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!