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

@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.


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.

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.

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!

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.

1 Like

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.

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.

2 Likes

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