# Script transform returning a strange result

**URL:** <https://forum.inductiveautomation.com/t/script-transform-returning-a-strange-result/27727>\
**Category:** Ignition Early Access\
**Tags:** scripting\
**Created:** [August 23, 2019, 6:40pm UTC](https://forum.inductiveautomation.com/t/script-transform-returning-a-strange-result/27727 "2019-08-23T18:40:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![md.szyman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/md.szyman/32/9240_2.png) [@md.szyman](https://forum.inductiveautomation.com/u/md.szyman)\
**Post date:** [August 23, 2019, 6:40pm UTC](https://forum.inductiveautomation.com/t/script-transform-returning-a-strange-result/27727/1 "2019-08-23T18:40:49Z")

</div>

```auto
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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/e9019ecf6ca86a63a70e0b7128f4d8c34ff1be92.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 23, 2019, 6:51pm UTC](https://forum.inductiveautomation.com/t/script-transform-returning-a-strange-result/27727/2 "2019-08-23T18:51:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 4, 2019, 3:14pm UTC](https://forum.inductiveautomation.com/t/script-transform-returning-a-strange-result/27727/3 "2019-10-04T15:14:26Z")

</div>

For an update: those fixes did get merged in time, so they’re available in 8.0.5, including the RC.
