# Binding a embedded page checkbox to a checkbox from a table on another page

**URL:** <https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [August 9, 2023, 8:42pm UTC](https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670 "2023-08-09T20:42:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob.richards](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bob.richards](https://forum.inductiveautomation.com/u/bob.richards)\
**Post date:** [August 9, 2023, 8:42pm UTC](https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670/1 "2023-08-09T20:42:21Z")

</div>

I have a perspective page with a table bound to a named query that returns a bit data type field, resulting in a checkbox.

I have an embedded page with a checkbox.

The table is set up with a rendered view to the embedded page with a checkbox.

How do I bind the checkbox data from the table to the checkbox on the embedded page, which is the rendered view?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 9, 2023, 9:27pm UTC](https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670/2 "2023-08-09T21:27:01Z")

</div>

I think you're mixing up some terminology here.

> - **Page** - A collection of views that are displayed within a single tab of a browser during runtime. A page consists of at least one view (called a "primary view"), any number of additional views that can be docked along the edges (called "docked views"), and a partial URL associated with the page,

[https://docs.inductiveautomation.com/display/DOC81/Pages+in+Perspective](https://docs.inductiveautomation.com/display/DOC81/Pages+in+Perspective)

> - **Views** can be [mounted in a Page](https://docs.inductiveautomation.com/display/DOC81/Pages+in+Perspective) as a primary, docked, or popup views. For more information on how pages work, see [Pages in Perspective](https://docs.inductiveautomation.com/display/DOC81/Pages+in+Perspective).

[https://docs.inductiveautomation.com/display/DOC81/Views+in+Perspective](https://docs.inductiveautomation.com/display/DOC81/Views+in+Perspective)

* * *

With all that out of the way, I think you are saying,

> I have a Perspective **view** with a table bound to a named query that returns a **boolean** data type field, to be displayed as a checkbox.

> I have an embedded **view** with a checkbox.

> The table is set up with a rendered view to **embed the view** with a checkbox.

> How do I bind the checkbox data from the table to the checkbox on the embedded **view** , which is the rendered view?

Is that correct?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 9, 2023, 9:32pm UTC](https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670/3 "2023-08-09T21:32:37Z")

</div>

If the above re-phrasing of your question is correct then there is no need for the embedded view. Instead configure the table props,

```auto
columns.n.render : boolean
columns.n.boolean : checkbox

```

(where _ **n** _ is the column number).

---

<div class="post-metadata">

**Author:** ![bob.richards](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bob.richards](https://forum.inductiveautomation.com/u/bob.richards)\
**Post date:** [August 9, 2023, 10:17pm UTC](https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670/4 "2023-08-09T22:17:34Z")

</div>

Your re-phrasing is likely correct. Its just that from the tree node seen in the attachment, it appears I am dealing with two pages within a view. The first page [Control] has a table bound to a SQL Query, which has a bit column resulting in a checkbox. The second page [Checkbox] is comprised of a single checkbox component, which is a rendered view on the bit column on [Control].  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/8/28413419ccbc70a292a0b310f17da218ef5e8e22.png)

I am looking to bind the checkbox of the rendered view (the checkbox component) on [Checkbox] to the bit field from the SQL Query on [Control].

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 9, 2023, 10:32pm UTC](https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670/5 "2023-08-09T22:32:25Z")

</div>

> Its just that from the tree node seen in the attachment, it appears I am dealing with two pages within a view.

Those are **views** , not pages, despite the "Page" folder name. Pages are defined in the Page Configuration window.

> The first ~~page~~ **view** [Control] has a table bound to a SQL Query, which has a ~~bit~~ **boolean** column ~~resulting in a checkbox~~. [_SQL doesn't render anything so it can't return a "checkbox" - only a boolean value which your view can render as a checkbox._] The second ~~page~~ **view** [Checkbox] is comprised of a single checkbox component, which is a rendered view on the ~~bit~~ **boolean** column on [Control].

> I am looking to bind the checkbox of the rendered view (the checkbox component) on [Checkbox] to the ~~bit~~ boolean field from the SQL Query on [Control].

I know, and as explained, it's much simpler than you are making it. The embedded view is not required. Let the table column render it as **boolean** and set the boolean display as **checkbox**.

Sorry for all the corrections which may appear pedantic, but words have precise meanings and you're going to struggle if you get them wrong (and we're going to struggle trying to decipher your posts).

---

<div class="post-metadata">

**Author:** ![bob.richards](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bob.richards](https://forum.inductiveautomation.com/u/bob.richards)\
**Post date:** [August 9, 2023, 11:25pm UTC](https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670/6 "2023-08-09T23:25:20Z")

</div>

Thanks Transistor. The problem with letting the table column render it as a boolean and display as a checkbox is that it takes two clicks (basically a double click) to change from checked to unchecked, or vice-versa, which is an absolutely undesirable, and ridiculous outcome (just my opinion). I was given an indication in my research that the double click could be eliminated with a rendered view, and so far, the rendered view on the boolean provides a single click (if I change the boolean column to not editable), only I do not know how to bind the boolean to the view [Checkbox].

---

<div class="post-metadata">

**Author:** ![bob.richards](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bob.richards](https://forum.inductiveautomation.com/u/bob.richards)\
**Post date:** [August 10, 2023, 2:39pm UTC](https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670/7 "2023-08-10T14:39:21Z")

</div>

With all the semantics covered, getting back to the original question that started this post, how do I bind the boolean in view [Control] to the view [Checkbox]?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 10, 2023, 2:57pm UTC](https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670/8 "2023-08-10T14:57:55Z")

</div>

The table's row data is passed to any embedded view. That means that you can bind the checkbox enabled propert to the view's row data. See how to use `view.params.value` at the bottom of [Table Column Configurations - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/Table+Column+Configurations#TableColumnConfigurations-EmbeddingaViewinaTableCell).

I've seen a post on the forum about how to do the single-click on cell to toggle the checkbox. I'll report back when I find it.

---

<div class="post-metadata">

**Author:** ![bob.richards](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@bob.richards](https://forum.inductiveautomation.com/u/bob.richards)\
**Post date:** [August 10, 2023, 5:03pm UTC](https://forum.inductiveautomation.com/t/binding-a-embedded-page-checkbox-to-a-checkbox-from-a-table-on-another-page/77670/9 "2023-08-10T17:03:34Z")

</div>

Perfect. Thank you @Transistor . The binding between the two views is successful using the view.params.value and the Checkbox only requires a single click to change from checked to unchecked, and vice-versa.
