Script transform returning a strange result

scripting
#1
dropdownSelected = self.parent.getChild("Controls").getChild("Dropdown").props.value
  
faults = list(self.view.custom.faults)
  
if dropdownSelected == 999:
  return faults
  
else:
  newvals = []
  for val in faults:
    if(val["faultType"] == dropdownSelected):
      newvals.append(val)
  
  return newvals

I have the above script performing some manipulation on a JSON data set in view.custom.faults and I’m simply trying to use a Dropdown value to filter through it.

As far as I can tell this script should work and it’s fairly straightforward and very similar to other scripting I’ve done, however, I’m getting some strange values back in the property it’s bound to.

0 Likes

#2

Yep, this is related to a couple of other issues that I’m trying to work through with the property trees and how they interact with scripting. Hoping to have it resolved in 8.0.5.

0 Likes