# Perspective - Table and boolean column

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-and-boolean-column/91614>\
**Category:** General Discussion\
**Tags:** perspective\
**Created:** [June 10, 2024, 12:06pm UTC](https://forum.inductiveautomation.com/t/perspective-table-and-boolean-column/91614 "2024-06-10T12:06:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [June 10, 2024, 12:06pm UTC](https://forum.inductiveautomation.com/t/perspective-table-and-boolean-column/91614/1 "2024-06-10T12:06:50Z")

</div>

Good afternoon,  
probably I'm missing some settings, but I'm trying to show a boolean status in a column with a toogle.  
The problem is that I can make it change color, it's always grey.

Initially the column is a "integer", I try to cast to a "boolean" too but it doesn't work in any case.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/f/cfeae358b09d9875aacb010bdf5aa061c0566e62.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/7/b7d759f63ddc000523e8518ed169a3d6cd031e5a.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 10, 2024, 12:29pm UTC](https://forum.inductiveautomation.com/t/perspective-table-and-boolean-column/91614/2 "2024-06-10T12:29:29Z")

</div>

It's grey because the switch is disabled.  
check the `editable` checkbox and it will accept the color configuration.

---

<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:** [June 10, 2024, 3:17pm UTC](https://forum.inductiveautomation.com/t/perspective-table-and-boolean-column/91614/3 "2024-06-10T15:17:26Z")

</div>

Two more things:

1. Rendering the column as boolean and making it editable will not result in any user changes being written to your data unless you provide your own logic within an Event on what to do with the updated data.
2. If you're expecting any of rows to be false/inactive/off, but you're seeing true/active/on, verify that your data is not a string representation of a numeric value, ie:

```python
print(bool("0"))
True

```

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [June 11, 2024, 6:26am UTC](https://forum.inductiveautomation.com/t/perspective-table-and-boolean-column/91614/4 "2024-06-11T06:26:44Z")

</div>

Thank you @pascal.fragnoud for the help, the editable property was the problem and thanks @cmallonee for the suggestions.

Have a nice day!

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [June 11, 2024, 6:58pm UTC](https://forum.inductiveautomation.com/t/perspective-table-and-boolean-column/91614/5 "2024-06-11T18:58:23Z")

</div>

> [@cmallonee](#):
>
> Rendering the column as boolean and making it editable will not result in any user changes being written to your data unless you provide your own logic within an Event on what to do with the updated data.

Dear @cmallonee one more information about this please.. Now that I deselect the editable property I can see the toggle color changes according to the boolean value, but if I click on it I can change it's value. As you said it doesn't change the data actually, but I would like to avoid the click so to see the present data..  
How can I do?

---

<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:** [June 11, 2024, 7:13pm UTC](https://forum.inductiveautomation.com/t/perspective-table-and-boolean-column/91614/6 "2024-06-11T19:13:20Z")

</div>

You can set `editable` to `false`.

The `editable` property dictates whether a user can interact with the toggle switch. Your original problem was probably best resolved by modifying the CSS style values assigned to disabled toggle switches, instead of simply allowing for them to be editable, as you're now seeing.

You may need to grow comfortable with using the `stylesheet.css` resource to manage how toggle inside of a Table are displayed.

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [June 11, 2024, 7:15pm UTC](https://forum.inductiveautomation.com/t/perspective-table-and-boolean-column/91614/7 "2024-06-11T19:15:21Z")

</div>

Thanks for the reply, tomorrow I will make some test with the CSS style and I update the topic.

Have a nice day.
