Hi, I have a script on a numeric label, each time the value changes I do some operations and depending on the result of the operations I update several rows of a table dataset.
What I have now is this:
if event.propertyName == “value”:
print “change in performance value”
updatedRow = system.dataset.updateRow(data, 0,{“Value”:(performance*100)})
event.source.parent.getComponent(‘Pie Chart 1’).data = updatedRow
data = event.source.parent.getComponent(‘Pie Chart 1’).data
updatedRow = system.dataset.updateRow(data, 1,{“Value”:(1-performance)*100})
event.source.parent.getComponent(‘Pie Chart 1’).data = updatedRow
I am reading the dataset and update 1 row, then read again the dataset and update other row and so on …
The solution works, however I am looking for a much efficient solution. Do you have any other ideas?
Thanks!