IBM QRadar SOAR

IBM QRadar SOAR

Join this online user group to communicate across Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Unicode in data table issue.

    Posted Tue March 31, 2020 10:49 AM
    For audit purposes we have a data table that captures incident attributes into the table when the incident.properties.incident_attributes field is changed.
    I can't seem to get rid of the u' that appears before each of the list items in the table . Is there any way to get around this in the scripting engine? (I've tried unicode() and str())
    The incident attributes field is a multi-select list type.

    Script is;

    from java.util import Date
    now = Date()
    
    row = incident.addRow("qa_incident_attributes_audit")
    row.qa_incident_attributes_value = str(incident.properties.incident_attributes)
    row.qa_incident_attributes_modified_by = str(principal.display_name)
    row.qa_incident_attributes_modified_on = str(now)
    Cheers!

    ------------------------------
    Leon
    ------------------------------


  • 2.  RE: Unicode in data table issue.

    Posted Wed April 01, 2020 07:46 AM
    Hi Leon,

    I haven't tried this in our scripting engine, but you can try teasing out each element in the multiselect field similar to these code samples:

    str(u', '.join(incident.properties.incident_attributes​))

    or

    [str(x) for x in incident.properties.incident_attributes]


    Good luck



    ------------------------------
    Mark Scherfling
    ------------------------------



  • 3.  RE: Unicode in data table issue.

    Posted Thu May 28, 2020 08:15 AM
    Thanks Mark, apologies for the late reply but this works a treat :)

    ------------------------------
    Leon Goodwin
    ------------------------------