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.