# \[Possible Bug?\] Issue sending params through to script

**URL:** <https://forum.inductiveautomation.com/t/possible-bug-issue-sending-params-through-to-script/24660>\
**Category:** Ignition Early Access\
**Created:** [May 3, 2019, 10:42pm UTC](https://forum.inductiveautomation.com/t/possible-bug-issue-sending-params-through-to-script/24660 "2019-05-03T22:42:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [May 3, 2019, 10:42pm UTC](https://forum.inductiveautomation.com/t/possible-bug-issue-sending-params-through-to-script/24660/1 "2019-05-03T22:42:20Z")

</div>

I’m a little confused on how binding works vs referencing to the same object through a script.

When binding to an object (in this case an array), the ‘value’ that gets sent to the transform script is an:  
\<type ‘array.array’\>  
which I can work with as i’d expect (aside from having to cast PyDocumentObjectAdapters as dicts)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/4e25fc8e4b91298ec3efb6aa925c7c6ba36bccc5.png)  
Good output:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/c3db3cffe183a9818f9d3ea6c49d03d57940d1cf.png)

but when referencing it directly in a transform script i.e. self.view.params.tags, the type of it is:  
\<type ‘array.array’\> but the object is surrounded by ‘array()’ and contains QVs

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/457b38dd9f63e1a40ff808233d734e730e59ad15.png)  
Bad output:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/d/d18b962fa889f24579b7bc58f6b7be439383ff97.png)

is this how it’s supposed to work? I assumed binding to vs referencing directly would send through as the same datatype, but that doesn’t seem to be the case

---

<div class="post-metadata">

**Author:** ![mhickerson](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mhickerson](https://forum.inductiveautomation.com/u/mhickerson)\
**Post date:** [May 21, 2019, 10:14pm UTC](https://forum.inductiveautomation.com/t/possible-bug-issue-sending-params-through-to-script/24660/2 "2019-05-21T22:14:07Z")

</div>

Hi Matthew,

This is indeed how the Script Transform is intended to work; a call to the transform function is currently stripping the values from the Qualified Values for convenience. I’ve notified our Training Department in order to highlight this in the documentation.

I’m unsure as to how you’re using PyDocumentObjectAdapter, but I would not think you should have to.

Mitch

---

<div class="post-metadata">

**Author:** ![Matthew.gaitan](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@Matthew.gaitan](https://forum.inductiveautomation.com/u/Matthew.gaitan)\
**Post date:** [May 22, 2019, 1:57pm UTC](https://forum.inductiveautomation.com/t/possible-bug-issue-sending-params-through-to-script/24660/3 "2019-05-22T13:57:51Z")

</div>

Hey Mitch,

If that is the case, is there a function I can send my dataset to that will strip the values in the same manner?

As for the PyDocumentObjectAdapter, I was using that to check if the object was of that type so I could cast it as a dict.

Thank you for your reply,  
Matthew

---

<div class="post-metadata">

**Author:** ![mhickerson](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mhickerson](https://forum.inductiveautomation.com/u/mhickerson)\
**Post date:** [May 24, 2019, 11:48pm UTC](https://forum.inductiveautomation.com/t/possible-bug-issue-sending-params-through-to-script/24660/4 "2019-05-24T23:48:28Z")

</div>

This automatic unwrapping is currently handled for single Qualified Values, arrays of Qualified Values, and map objects with String keys mapped to Qualified Values. It does not currently handle Dataset objects.
