# Dataset in Prespective

**URL:** <https://forum.inductiveautomation.com/t/dataset-in-prespective/85618>\
**Category:** Ignition\
**Tags:** vision, perspective\
**Created:** [February 13, 2024, 11:22am UTC](https://forum.inductiveautomation.com/t/dataset-in-prespective/85618 "2024-02-13T11:22:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jhonny\_Palas](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jhonny\_Palas](https://forum.inductiveautomation.com/u/Jhonny_Palas)\
**Post date:** [February 13, 2024, 11:22am UTC](https://forum.inductiveautomation.com/t/dataset-in-prespective/85618/1 "2024-02-13T11:22:42Z")

</div>

Hi,

i have a question, i need add dataset like properties in native object, but i have only 3 propose, 'object' - 'value' - 'array'.

With Vision Module its possible, ma with Prespective i dont know what to do...

Thanks so much in advance

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [February 13, 2024, 11:31am UTC](https://forum.inductiveautomation.com/t/dataset-in-prespective/85618/2 "2024-02-13T11:31:25Z")

</div>

Can you give more details? What native (built-in?) object? What is the source of this data? Is it from a binding?

I've removed the `vision` tag from your question title as the question is about Perspective (even though it mentions Vision).

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 13, 2024, 12:39pm UTC](https://forum.inductiveautomation.com/t/dataset-in-prespective/85618/3 "2024-02-13T12:39:26Z")

</div>

Perspective does support datasets in object properties, but it doesn't provide a UI to create a property as a dataset. You can temporarily bind a `runScript` call to `system.dataset.toDataSet()` with constants to make one. Once there, you can manipulate it normally. Once you have one, you can copy its json form around.

---

<div class="post-metadata">

**Author:** ![Craig\_Rice](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@Craig\_Rice](https://forum.inductiveautomation.com/u/Craig_Rice)\
**Post date:** [May 29, 2024, 1:28pm UTC](https://forum.inductiveautomation.com/t/dataset-in-prespective/85618/4 "2024-05-29T13:28:02Z")

</div>

I'm having the same issue and believe pturmel's post is the solution. Where in Perspective do I bind runScript to call system.system.toDataSet().

Thanks

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 29, 2024, 1:30pm UTC](https://forum.inductiveautomation.com/t/dataset-in-prespective/85618/5 "2024-05-29T13:30:11Z")

</div>

Use an expression binding like so on the property you want to have a dataset:

```python
runScript("system.dataset.toDataSet([], [])", 0)

```

That places an empty dataset on the property. Then delete the binding and you can use the dataset editor from there.

---

<div class="post-metadata">

**Author:** ![Craig\_Rice](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@Craig\_Rice](https://forum.inductiveautomation.com/u/Craig_Rice)\
**Post date:** [May 29, 2024, 2:44pm UTC](https://forum.inductiveautomation.com/t/dataset-in-prespective/85618/6 "2024-05-29T14:44:51Z")

</div>

Thanks. Next question is I have a query that returns a 1x2 dataset. I want value row 1, col 1 of that dataset for a label, and row 1, col 2 for say a max value on a dial. How do access these individually?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 29, 2024, 3:10pm UTC](https://forum.inductiveautomation.com/t/dataset-in-prespective/85618/7 "2024-05-29T15:10:38Z")

</div>

> [@Craig\_Rice](#):
>
> How do access these individually?

In an expression, use [square braces](https://www.docs.inductiveautomation.com/docs/8.1/platform/expression-language-and-syntax#dataset-access).

In a script, use [.getValueAt()](https://www.docs.inductiveautomation.com/docs/8.1/platform/scripting/python-scripting/variables-datatypes-and-objects/datasets#accessing-data-in-a-dataset).

---

<div class="post-metadata">

**Author:** ![Craig\_Rice](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@Craig\_Rice](https://forum.inductiveautomation.com/u/Craig_Rice)\
**Post date:** [May 29, 2024, 3:19pm UTC](https://forum.inductiveautomation.com/t/dataset-in-prespective/85618/8 "2024-05-29T15:19:08Z")

</div>

Thanks, that was it.
