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
------------------------------
Original Message:
Sent: Tue March 31, 2020 10:48 AM
From: Leon Goodwin
Subject: Unicode in data table issue.
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 Datenow = 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
------------------------------