# Dynamically generated table use toggles instead of True/False?

**URL:** <https://forum.inductiveautomation.com/t/dynamically-generated-table-use-toggles-instead-of-true-false/76157>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [July 10, 2023, 7:40pm UTC](https://forum.inductiveautomation.com/t/dynamically-generated-table-use-toggles-instead-of-true-false/76157 "2023-07-10T19:40:08Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![ian.sebryk](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ian.sebryk/32/49319_2.png) [@ian.sebryk](https://forum.inductiveautomation.com/u/ian.sebryk)\
**Post date:** [July 11, 2023, 2:40pm UTC](https://forum.inductiveautomation.com/t/dynamically-generated-table-use-toggles-instead-of-true-false/76157/11 "2023-07-11T14:40:37Z")

</div>

> [@Transistor](#):
>
> The binding to the database is one-way only. It won't write back.  
> To write back to the database you need to write some scripts and create the queries

i'm actually just working with _datasets_ saved to the user tag. does that make any difference? no _database_ is being used in this case: no SQL queries, just dataset references.

> [@Transistor](#):
>
> It's not that hard to script though if you get to grips with basic Python scripting and how to set dictionary values.

i know Python fairly well. still my biggest hurdle is being able to 'see' the output. i'm used to dumping contents to the console, **seeing** what i'm working with, and then setting up the exact functions i'm needing to get the data i want. for example, this script/dataset i'm working with puts square brackets around 2/3rds of the fields and has left most of the keys in the output. i don't know if that's representational or if that's the actual strings held in the dataset.

@jlandwerlen gave me some excellent advice on setting up logging, but that's a trip to the Gateway logging interface every damn time i want something simple. this feels lugubrious at best... and i think @nminchin hit it on the head: "it's _always_ hard work".

as for the toggles themselves, i followed [your post](https://forum.inductiveautomation.com/t/editing-perspective-table-with-allowediton-single-click-still-takes-two-clicks/30446/3) and it just generates this error:

```auto
Error running action 'component.onRowClick' on ian_development/ian_user_table@D/root/Table:
 Traceback (most recent call last): File "<function:runAction>", line 9, in runAction TypeError:
 'com.inductiveautomation.ignition.common.BasicDataset' object is unsubscriptable

```

and the Property Editor pane tells me that 'addtional properties aren't allowed'. 🤯

 ![tableToggleFrustrations](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/8/e81dc0e1007964be8c97aa9f1e48d01cdd2475c5.jpeg)

i am too new to understand what the heck that means. this should be a simple thing. it's a `toggle` for heaven's sake! how does it not have any useful base functionality? \*sigh\* whining aside, please help me understand how this _should_ work.

---

_[View the full topic](https://forum.inductiveautomation.com/t/dynamically-generated-table-use-toggles-instead-of-true-false/76157)._
