# Table Subview Binding Help

**URL:** <https://forum.inductiveautomation.com/t/table-subview-binding-help/80665>\
**Category:** Ignition\
**Created:** [October 18, 2023, 8:16pm UTC](https://forum.inductiveautomation.com/t/table-subview-binding-help/80665 "2023-10-18T20:16:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcan87](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dcan87/32/54071_2.png) [@dcan87](https://forum.inductiveautomation.com/u/dcan87)\
**Post date:** [October 18, 2023, 8:16pm UTC](https://forum.inductiveautomation.com/t/table-subview-binding-help/80665/1 "2023-10-18T20:16:40Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/7/b78fd9cf002492c9090ee254cea4f2f48a65359d.png)  
Hello, I am trying to create a table of our production lines with the subview being the machines under the line.Is there a way to property bind these and what is the most efficient way to do?

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [October 19, 2023, 4:42am UTC](https://forum.inductiveautomation.com/t/table-subview-binding-help/80665/2 "2023-10-19T04:42:56Z")

</div>

I think I have an idea of what you're asking, but you're probably gonna need to provide more information...

---

<div class="post-metadata">

**Author:** ![dcan87](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dcan87/32/54071_2.png) [@dcan87](https://forum.inductiveautomation.com/u/dcan87)\
**Post date:** [October 19, 2023, 3:53pm UTC](https://forum.inductiveautomation.com/t/table-subview-binding-help/80665/3 "2023-10-19T15:53:31Z")

</div>

Go ahead what is your question?

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [October 19, 2023, 5:05pm UTC](https://forum.inductiveautomation.com/t/table-subview-binding-help/80665/4 "2023-10-19T17:05:14Z")

</div>

I feel like it is the responsibility of the OP (you) to post as much information as possible and then other users ask clarifying questions... Your question is very broad and doesn't have much to do with the picture you posted, you gotta be a little more specific. Anyway, here are some questions, since you asked...

What I understood from the question as it stands is that you have a table and then a subview in the table, which I can see from the screenshot. Where and what are you trying to bind? The subview to a value that is coming from a Table row? Something else? Is your subview another Table?

---

<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:** [October 19, 2023, 5:18pm UTC](https://forum.inductiveautomation.com/t/table-subview-binding-help/80665/5 "2023-10-19T17:18:59Z")

</div>

It does seem like there's some confusion here. There is no "binding" of subview data - the subview receives all of the information contained within the row. If you need that subview to have information regarding machines for a line, you either need to supply the machines as a column of the row data (though that column does not need to be displayed), or you need to supply enough information in the columns of the row that the machines can be obtained through something like a query.

For example, if your row is a production line, I'll pretend your data is something like this:

```auto
[
    {
        "Area": "Packaging",
        "MachinesQty": 7,
        "Parent": "L32",
        "Product": null,
        "StatusBar": "value",
        "ValueStream": "OSD" 
    }
]

```

You would need to change the data structure to something like one of these structures:

```auto
# This example provides the row with all of the machines for this line. 
# The 'Machines' column does not have to be displayed within the Table - 
# you just need the data to be present in the row. The View being used 
# for the subview should expect a param of `Machines` as an array. 
[
    {
        "Area": "Packaging",
        "MachinesQty": 7,
        "Parent": "L32",
        "Product": null,
        "StatusBar": "value",
        "ValueStream": "OSD",
        "Machines": [
            {
                "id": 1
            }
            {
                "id": 2
            }
        ]
    }
]

```

Alternatively, you could just supply the View being used for the subview enough information that it could query for the machines itself:

```auto
[
    {
        "Area": "Packaging",
        "MachinesQty": 7,
        "Parent": "L32",
        "Product": null,
        "StatusBar": "value",
        "ValueStream": "OSD",
        "ProdLineId": 1
    }
]

```

Then you can have a query which pulls all machine IDs for the line based on the `ProdLineId` param received from the row data.

---

<div class="post-metadata">

**Author:** ![dcan87](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dcan87/32/54071_2.png) [@dcan87](https://forum.inductiveautomation.com/u/dcan87)\
**Post date:** [October 27, 2023, 7:09pm UTC](https://forum.inductiveautomation.com/t/table-subview-binding-help/80665/6 "2023-10-27T19:09:54Z")

</div>

Hello all, Ricardo from IA support was able to find us a number of solutions, currently we are using the quickest solution for calling the correct sub view rows. Wanted to share here in case anyone else is looking for similar solution.

Concept:

- In the main table, each row is a manufacturing line.
- In the sub view table, each row is a machine on the line. (In the simple case we used to get this working, our sub view table is going to be a very large table. ex. 3-7 machines per manufacturing line and approx. 30 lines.)

On the Main table props under 'rows':

1. Just need to enable subview and point to your subview path table.

In your subview table properties under 'filter':  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/f/7f266888e8e8cd41abbf1e0466fafc6e6795ef9c.png)

1. enabled - true
2. Configure a property binding to the 'text' field -'view.params.value.LineID'  
-The perspective view housing the subview table has a PARAMS value added with  
key name 'LineID'
3. After confirmed it is working like expected, under the style props you can add:  
-'display:none' in order to hide the filter textfield.

Now after following the breadcrumbs and trying to write it up, I can't figure out how when you click on the main row drop down it is passing the LineID data into the subview filter. I can't find any extra bindings or event scripts. Any ideas?

This was done in **Ignition Platform** `8.1.20`.

---

<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:** [October 27, 2023, 8:10pm UTC](https://forum.inductiveautomation.com/t/table-subview-binding-help/80665/7 "2023-10-27T20:10:46Z")

</div>

> [@dcan87](#):
>
> I can't figure out how when you click on the main row drop down it is passing the LineID data into the subview filter. I can't find any extra bindings or event scripts. Any ideas?

See below:

> [@cmallonee](#):
>
> There is no "binding" of subview data - the subview receives all of the information contained within the row.

So your Table data contains a column with a name of `LineID`. When the subview receives the params from the row, every column of the row is present in `params.value`, but the most important one for your setup is `LineID`.
