# \[Question\] Perspective - Named query datatypes

**URL:** <https://forum.inductiveautomation.com/t/question-perspective-named-query-datatypes/23448>\
**Category:** Ignition Early Access\
**Created:** [March 19, 2019, 5:04pm UTC](https://forum.inductiveautomation.com/t/question-perspective-named-query-datatypes/23448 "2019-03-19T17:04:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [March 19, 2019, 5:04pm UTC](https://forum.inductiveautomation.com/t/question-perspective-named-query-datatypes/23448/1 "2019-03-19T17:04:31Z")

</div>

I’m not sure if this is a bug or if there is a simple datatype casting I can do do address this, but I’m running a named query to return data for a table in perspective. Several of the columns are boolean values. In the SQL database they are bit datatype. The driver seems to be converting them to true/false, but the table component is viewing them as strings and not boolean so some logic that is determined based on the row selected isn’t functioning properly.

Any ideas?

---

<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:** [March 19, 2019, 5:40pm UTC](https://forum.inductiveautomation.com/t/question-perspective-named-query-datatypes/23448/2 "2019-03-19T17:40:09Z")

</div>

Is your Table column renderMode set to `auto` for the column in question? What happens if you set it to `boolean`?

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [March 19, 2019, 5:42pm UTC](https://forum.inductiveautomation.com/t/question-perspective-named-query-datatypes/23448/3 "2019-03-19T17:42:57Z")

</div>

I didn’t have any of the column array elements filled in. I just did that, and when I do fill them in and change them from Auto to boolean, the data still displays 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:** [March 19, 2019, 6:04pm UTC](https://forum.inductiveautomation.com/t/question-perspective-named-query-datatypes/23448/4 "2019-03-19T18:04:19Z")

</div>

Yep, looks to be a bug. I’ve opened an internal ticket to track it.

---

<div class="post-metadata">

**Author:** ![BumbleBeeTuna](https://avatars.discourse-cdn.com/v4/letter/b/cc9497/32.png) [@BumbleBeeTuna](https://forum.inductiveautomation.com/u/BumbleBeeTuna)\
**Post date:** [March 19, 2019, 6:09pm UTC](https://forum.inductiveautomation.com/t/question-perspective-named-query-datatypes/23448/5 "2019-03-19T18:09:33Z")

</div>

When I set the field key on the column in question the cell becomes a checkbox.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/10f99ab0f9cbb76df72e7d9978dc8c3e8fe53488.png)

---

<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:** [March 19, 2019, 6:13pm UTC](https://forum.inductiveautomation.com/t/question-perspective-named-query-datatypes/23448/6 "2019-03-19T18:13:33Z")

</div>

Ah, yes, I was missing a step - thanks @BumbleBeeTuna!  
You need to set `column.field` to the column’s name - otherwise it doesn’t know which column the config is for. So set `column.field` to your column’s name, and set `column.render` to “boolean”.

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [March 19, 2019, 6:22pm UTC](https://forum.inductiveautomation.com/t/question-perspective-named-query-datatypes/23448/7 "2019-03-19T18:22:26Z")

</div>

That seems to work. Just going to take a little bit for 34 Columns.

Thanks
