Row operations and scripts
To access the row operations, the selected Object Type for the script must be Data Table.
The object contains the row data and helper method, as follows.
- datetime
- text
- getParentObject(), which returns the incident script object that owns this row.
Type row. to access the types of data and helper method.
The following script is a simple example of adding a row to a data table, named infected_systems.
It assumes that the data table includes an Owner Group column and an ID column. When the script runs
on a row in the data table, it takes the ID of that row and adds 1 to make it a unique number. It
then adds a row with the same information but an updated ID and a different value, HR, for the Owner
Group.
oldId = int(row.system_id)
newRow = incident.addRow("infected_systems")
newRow["system_id"] = str(oldId + 1)
newRow["owner_group"] = "HR"