Hi
Using perspective, I would like to display the 'scheduled events' data from an equipment schedule component in a table. I copied the binding, and all is fine....
except the format of the startDate and endDate fields. These come back as longs in milliseconds. I would like to convert them to date/time strings in the table.
So I use the following transform:
def transform(self, value, quality, timestamp):
for row in value:
system.perspective.print(row)
new_start = row['startDate']
new_end = row['endDate']
new_values = {'startDate':new_start, 'endDate':new_end}
row.update(new_values)
system.perspective.print(row)
return value
But I get an error "..... common.script.ada' object has no attribute update" referring to the row.update() line
It seems to me that the return value (Json) is a list of dictionaries, thus 'row' (dictionary) should have an update method.
What have I missed?
How would I achieve my objective?
Thanks in advance.