# PyDataSet assigned to custom not converted to dataset anymore?

**URL:** <https://forum.inductiveautomation.com/t/pydataset-assigned-to-custom-not-converted-to-dataset-anymore/39016>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [September 24, 2020, 12:24pm UTC](https://forum.inductiveautomation.com/t/pydataset-assigned-to-custom-not-converted-to-dataset-anymore/39016 "2020-09-24T12:24:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![petar.zurzevic](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@petar.zurzevic](https://forum.inductiveautomation.com/u/petar.zurzevic)\
**Post date:** [September 24, 2020, 12:24pm UTC](https://forum.inductiveautomation.com/t/pydataset-assigned-to-custom-not-converted-to-dataset-anymore/39016/1 "2020-09-24T12:24:42Z")

</div>

Hi, recently after upgrading to version 8.0.16 from 8.0.13 i noticed that all my tables columns were messed up.  
The reason of this event apparently is that after getting a pyDataSet from system.db.runNamedQuery() and assigned it to a custom, the custom in version 8.0.13 will auto-convert it to a DataSet type, but this does not happen in 8.0.16, thus making the custom not suitable for a table.  
Is this intended or is it a bug that is gonna be resolved in the next Release?

---

<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:** [September 24, 2020, 3:52pm UTC](https://forum.inductiveautomation.com/t/pydataset-assigned-to-custom-not-converted-to-dataset-anymore/39016/2 "2020-09-24T15:52:05Z")

</div>

This is a bug, planned to be fixed in 8.0.17 and 8.1.0 (to my knowledge).

---

<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:** [September 24, 2020, 4:48pm UTC](https://forum.inductiveautomation.com/t/pydataset-assigned-to-custom-not-converted-to-dataset-anymore/39016/3 "2020-09-24T16:48:40Z")

</div>

I noticed this as well and posted about it here:  
[http://forum.inductiveautomation.com/t/bug-446-runprepquery-no-longer-returning-dataset-from-script-transform-as-of-8-0-16](http://forum.inductiveautomation.com/t/bug-446-runprepquery-no-longer-returning-dataset-from-script-transform-as-of-8-0-16)

In the meantime you should be able cast it to a `BasicDataset` to retain the same functionality you had in 8.0.13.

```auto
from com.inductiveautomation.ignition.common import BasicDataset
return BasicDataset(system.db.runNamedQuery(args))

```

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [September 24, 2020, 5:05pm UTC](https://forum.inductiveautomation.com/t/pydataset-assigned-to-custom-not-converted-to-dataset-anymore/39016/4 "2020-09-24T17:05:34Z")

</div>

> [@Matthew.gaitan](#):
>
> In the meantime you should be able cast it to a `BasicDataset` to retain the same functionality you had in 8.0.13.

To add on this you could also use

```auto
return system.dataset.toDataSet(system.db.runNamedQuery(args))

```

---

<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:** [September 24, 2020, 5:18pm UTC](https://forum.inductiveautomation.com/t/pydataset-assigned-to-custom-not-converted-to-dataset-anymore/39016/5 "2020-09-24T17:18:17Z")

</div>

I could have sworn I didn’t have success with that :o. I will have to try it again. Thanks!
