Skip to main content

SetByIncidentId

This Script is part of the Common Scripts Pack.#

Sets a value into the context with the given context key. By default this will not append. This script works the same as the Set command, but can work across incidents by specifying ID as an argument.

Permissions#


This automation runs using the default Limited User role, unless you explicitly change the permissions. For more information, see the section about permissions here: https://docs.paloaltonetworks.com/cortex/cortex-xsoar/6-2/cortex-xsoar-admin/playbooks/automations.html

Script Data#


NameDescription
Script Typepython3
TagsDemistoAPI

Inputs#


Argument NameDescription
idThe incident to set the context values in. The default is "current incident".
keyThe key to set.
valueThe value to set to the key. THis can be an array. Usually, a DQ expression.
appendWhether the context key will be overwritten, this will occur when set to false. If it is set to true then the script will append to existing context key.
errorUnfinishedReturns an error if not all of the incidents where modified.

Outputs#


There are no outputs for this script.