# \[Bug-5221\] Dataset json content passed as string within table

**URL:** <https://forum.inductiveautomation.com/t/bug-5221-dataset-json-content-passed-as-string-within-table/53535>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 25, 2021, 3:33pm UTC](https://forum.inductiveautomation.com/t/bug-5221-dataset-json-content-passed-as-string-within-table/53535 "2021-11-25T15:33:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phandc](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@phandc](https://forum.inductiveautomation.com/u/phandc)\
**Post date:** [November 25, 2021, 3:33pm UTC](https://forum.inductiveautomation.com/t/bug-5221-dataset-json-content-passed-as-string-within-table/53535/1 "2021-11-25T15:33:59Z")

</div>

@cmallonee I am following your guides to passing some parameters into my embedded view table. In the table, I wrote a script that returns a dataset to the table. You can see it in the figure below.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/f/4fd40c1371913c501ea6e467588512d18c12094d.png)  
I also have two embedded views. Each view has its own value parameter. Because the data values of each cell table is the tag path, I bind them into labels to read the tag values through tag expression binding.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/9/09d71f1455da4c81690dee45dafd3beb680114cb.png)

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

The problem occurred when I tried to pass an object as “cell2” object in the script into Column2 view.  
The value of “cell1” is a tag path string so it’s easy for tag expression binding to interpolate the tag value. But when it came to “cell2” when I used {view.params.value.key1} to interpolate the tag value, it raised the InvalidPathSyntax. Because the view.params.value.key1 has single quote in tag path such as ‘[default]Ramp/Ramp0’ not [default]Ramp/Ramp0. I did not understand why it had a format like that. I suppose it would be [default]Ramp/Ramp0.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/c/0c2e0ee569f0f461008fa56625a6f2b313d5aba9.png)

How can I do to solve this issue? I wonder if the data format in the script was correct. Because I cannot create data as the dictionary format like in the example above.

Thank you for your precious time!

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 29, 2021, 4:36pm UTC](https://forum.inductiveautomation.com/t/bug-5221-dataset-json-content-passed-as-string-within-table/53535/2 "2021-11-29T16:36:23Z")

</div>

Your scenario raises a couple of questions:

1. Where does your script live? Is that a binding transform script? a property change script?
2. Why do you have to use a dataset?

I do see what you’re seeing though. It appears the dataset’s json content is actually being passed to the view as a string. I’m going to break this off into a separate thread an open an internal ticket to get this fixed.

---

<div class="post-metadata">

**Author:** ![phandc](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@phandc](https://forum.inductiveautomation.com/u/phandc)\
**Post date:** [November 29, 2021, 4:49pm UTC](https://forum.inductiveautomation.com/t/bug-5221-dataset-json-content-passed-as-string-within-table/53535/3 "2021-11-29T16:49:02Z")

</div>

Thanks for your reply.  
My script locates in the onStartUp event of the table.  
The reason why I use the dataset is that I don’t find any clear examples. I have fixed that issue recently by using the array of data instead of the dataset. But I still did not understand why it considered the dataset’s json content as a string.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [November 29, 2021, 4:57pm UTC](https://forum.inductiveautomation.com/t/bug-5221-dataset-json-content-passed-as-string-within-table/53535/4 "2021-11-29T16:57:15Z")

</div>

It’s just a bug. I personally recommend using arrays where possible, just because they allow for direct editing in the property editor. I’ve found that trying to use datasets in perspective often requires a lot of dataset \> array conversion, especially in locations where you might need to apply styling to something, or where you need to apply any sort of transform.

---

<div class="post-metadata">

**Author:** ![phandc](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@phandc](https://forum.inductiveautomation.com/u/phandc)\
**Post date:** [November 29, 2021, 5:09pm UTC](https://forum.inductiveautomation.com/t/bug-5221-dataset-json-content-passed-as-string-within-table/53535/5 "2021-11-29T17:09:35Z")

</div>

Yeah, thank you for your help. I hope that bug will be fixed soon.
