# How to display boolean as checkbox in a Perspective table

**URL:** <https://forum.inductiveautomation.com/t/how-to-display-boolean-as-checkbox-in-a-perspective-table/25276>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 23, 2019, 9:11pm UTC](https://forum.inductiveautomation.com/t/how-to-display-boolean-as-checkbox-in-a-perspective-table/25276 "2019-05-23T21:11:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenlu.han](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@chenlu.han](https://forum.inductiveautomation.com/u/chenlu.han)\
**Post date:** [May 23, 2019, 9:11pm UTC](https://forum.inductiveautomation.com/t/how-to-display-boolean-as-checkbox-in-a-perspective-table/25276/1 "2019-05-23T21:11:31Z")

</div>

Hi all,

I am trying to use a table to display a dataset of boolean values, like below:  
 ![VisionTable](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/63bbef70690b73d1309c68e234d014d90bb8ba88.png)

When I pass the same dataset tag to a Perspective Table, the cells display as text instead of checkboxes:  
 ![PerspectiveTable](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/21296767050d987c9cba6ae44f657730aecb1339.png)

This is the props values for one of the columns:  
 ![Config](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/864fdd72547f79d655e5bdd788246b18107b4e4b.png)

Can someone help me understand what I was missing to make it work?

Thanks in advance

Charles Han

---

<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:** [May 23, 2019, 9:47pm UTC](https://forum.inductiveautomation.com/t/how-to-display-boolean-as-checkbox-in-a-perspective-table/25276/2 "2019-05-23T21:47:36Z")

</div>

You actually need to specify the `field` property for the render modes to have an effect. In your use-case, set `columns[1].field` to “Input?” (you _might_ also need to set `columns[0].field` to “TagPath”). HOWEVER, there is an open ticket right now which is preventing boolean values in DataSets from rendering correctly - they will always display as selected because the DataSet stores the value as “false” (String), which isn’t being coerced to `False` or `0` correctly. The fix for that should be in very soon.

---

<div class="post-metadata">

**Author:** ![chenlu.han](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@chenlu.han](https://forum.inductiveautomation.com/u/chenlu.han)\
**Post date:** [May 23, 2019, 10:20pm UTC](https://forum.inductiveautomation.com/t/how-to-display-boolean-as-checkbox-in-a-perspective-table/25276/3 "2019-05-23T22:20:44Z")

</div>

Thanks for the reply. That is exactly why checkbox didn’t show.

Now I run into another question:  
When I check/uncheck a box from preview mode, the change does not transfer back to the dataset memory tag that the table props.data is binded to. I have checked that binding is Bidirectional and column edit is enabled.

I am not sure if this is related to the issue of False not showing properly that you mentioned. Or is there any other step I have missed to allow perspective table write back to dataset?

Thank you!

---

<div class="post-metadata">

**Author:** ![jianping.li](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@jianping.li](https://forum.inductiveautomation.com/u/jianping.li)\
**Post date:** [May 24, 2019, 7:50am UTC](https://forum.inductiveautomation.com/t/how-to-display-boolean-as-checkbox-in-a-perspective-table/25276/4 "2019-05-24T07:50:57Z")

</div>

I have the same question, and I don’t know how to change value of the Table data via change the checkbox value.

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [May 24, 2019, 3:16pm UTC](https://forum.inductiveautomation.com/t/how-to-display-boolean-as-checkbox-in-a-perspective-table/25276/5 "2019-05-24T15:16:06Z")

</div>

Hi,

The latest nightly includes a fix for the ticket Cody described above.

The table component does not write back to a bound dataset after an edit is committed. Instead, we provide you with the ability to listen to the `onEditCellCommit` event and then do with that information as you please. The event has the shape:

```auto
{ 
  column: string | number;
  row: number;
  value: any;
}

```

---

<div class="post-metadata">

**Author:** ![chenlu.han](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@chenlu.han](https://forum.inductiveautomation.com/u/chenlu.han)\
**Post date:** [May 24, 2019, 4:51pm UTC](https://forum.inductiveautomation.com/t/how-to-display-boolean-as-checkbox-in-a-perspective-table/25276/6 "2019-05-24T16:51:43Z")

</div>

Hi

The onEditCellCommit event script works, thanks!

There is one related issue I found:

If I set both enableRowSelection and enableColumnSelection properties to false, the onEditCellCommit script will not fire. I have to select either one, or both in order for the script under onEditCellCommit to execute.  
 ![enableRowColSelections](https://us1.discourse-cdn.com/inductiveautomation/original/2X/a/afc719e42dd8ba3ec814eca8ef806d01b00a074a.png)

But if I have either set to true and use the table in runtime, the first click to the checkbox does not toggle its value, but selects the cell. Then I need to click again to flip boolean value.  
 ![highlightCell](https://us1.discourse-cdn.com/inductiveautomation/original/2X/e/ed7bc95a9efe3dab9abb32227757f834f672c39f.png)

This is an extra step. Is there a way to use onEditCellCommit event without turning row/column selection ON?

Thank you!

---

<div class="post-metadata">

**Author:** ![sanjanakrishnamurthy](https://avatars.discourse-cdn.com/v4/letter/s/bcef8e/32.png) [@sanjanakrishnamurthy](https://forum.inductiveautomation.com/u/sanjanakrishnamurthy)\
**Post date:** [May 12, 2026, 6:42am UTC](https://forum.inductiveautomation.com/t/how-to-display-boolean-as-checkbox-in-a-perspective-table/25276/7 "2026-05-12T06:42:59Z")

</div>

Hi,

Did you find any solution for this?

> [@chenlu.han](#):
>
> This is an extra step. Is there a way to use onEditCellCommit event without turning row/column selection ON?

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [May 12, 2026, 12:18pm UTC](https://forum.inductiveautomation.com/t/how-to-display-boolean-as-checkbox-in-a-perspective-table/25276/8 "2026-05-12T12:18:04Z")

</div>

> [@chenlu.han](#):
>
> Is there a way to use onEditCellCommit event without turning row/column selection ON?

It will be a few extra steps involved, but you could render the column as a view, in which you create an embedded view containing only a checkbox which is then displayed exactly as it is now to the clients. To permit write functionality, you would need a message handler (sent by embedded view, received by component / view housing your dataset.  
I prefer this route for most writes within a table to avoid the requirement to triple-click (2=edit mode, 1=toggle) to change (boolean) values.
