# \[Bug-1715\]Apply Subview to a Subset of Perspective Table Rows

**URL:** <https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 1, 2021, 2:31pm UTC](https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817 "2021-02-01T14:31:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![m.boog](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@m.boog](https://forum.inductiveautomation.com/u/m.boog)\
**Post date:** [February 1, 2021, 2:31pm UTC](https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817/1 "2021-02-01T14:31:35Z")

</div>

Hi All,

I’m working in Perspective, 8.0.16.

Wondering if there is a way to apply the subview functionality in the Table component to a subset of rows. In the table below, for example, the Picking Area has a set of children areas to display, but the Merge Area doesn’t have any children. Is it possible to remove the icon and expand functionality just from the Merge row?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/c/6c08549b7f7304e264a3c86da89eab75bcf4d8ea.png)

Thanks.

---

<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:** [February 1, 2021, 4:11pm UTC](https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817/2 "2021-02-01T16:11:41Z")

</div>

There is, but it’s a little complicated.

If the actual `data` property must contain a setting for the subview, which allows you to disable that functionality for a single row.

In the following screenshot, you can see that the final row within my `data` property has two objects for the row: `value` and `subview`. The `subview` property also has an internal key of `enabled`. This `enabled` key is what determines the individual row’s presence of a subview. The `value` property is where the true “data” of the row is stored.

 ![Screen Shot 2021-02-01 at 8.07.52AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/e/5e68f8f74847b4293177f4aa851921bbce270937.png)

---

<div class="post-metadata">

**Author:** ![m.boog](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@m.boog](https://forum.inductiveautomation.com/u/m.boog)\
**Post date:** [February 1, 2021, 7:14pm UTC](https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817/3 "2021-02-01T19:14:56Z")

</div>

That did it, thanks for the help! That’s a neat trick to know for tables.

As a note for other people reading this, I noticed that by defining the rows explicitly in the **data[]** property, the **rows{}** property was overwritten. So I also had to include a viewPath under the **data[].subview{}** property instead of listing it in the rows{} property. I assume this works the same way for the rest of the row properties.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/6/06114edd568fffcfdbb8626225db37ce5c3535e3.png)

---

<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:** [February 1, 2021, 7:16pm UTC](https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817/4 "2021-02-01T19:16:55Z")

</div>

That shouldn't be _required_. My current setup works fine without it - as you can see from the screenshot. Can you clarify this:

> [@m.boog](#):
>
> I noticed that by defining the rows explicitly in the **data[]** property, the **rows{}** property was overwritten.

---

<div class="post-metadata">

**Author:** ![m.boog](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@m.boog](https://forum.inductiveautomation.com/u/m.boog)\
**Post date:** [February 1, 2021, 8:04pm UTC](https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817/5 "2021-02-01T20:04:06Z")

</div>

Sure - maybe I misunderstood your steps.

Following your instructions worked to allow/restrict the subview dropdown functionality for each row, but the actual subview failed to show in my table.

For testing, I created a 2-row table, one (row a) with the subview functionality, and one (row b) without. Notice that I set the subview viewPath property in the rows{} property.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/c/fc2d4c6fa7be2008551e079af202cde79060edf7.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/9/c9ad7281bd6777aa99609b55200ee3973221884c.png)

When I ran this, the subview icons showed as expected for the 2 rows, but the subview didn’t show:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/8/085cd9310bfadaf924128cd3859e463d4d14d0e8.png)

This looked to me like the subview viewPath property had been overwritten by what was defined in the data property. So I added a viewPath property to data.subview, and the subview appeared.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/e/2e31c3b8ad956f61309518d06942d775c14e993c.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/c/bc655af29b5a7766519df3ba2dd8e095bbf2f44c.png)

Let me know if I’m missing something.

Thanks.

---

<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:** [February 1, 2021, 8:19pm UTC](https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817/6 "2021-02-01T20:19:43Z")

</div>

Ah, yes, that’s an oversight on our part. I’ll open an internal ticket to address that. If you are supplying the `subview` object for each row, then you’re right - you must also supply the `viewpath` property.

Sorry, I had believed you were just targeting a single row.

---

<div class="post-metadata">

**Author:** ![Steve\_Hook](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Steve\_Hook](https://forum.inductiveautomation.com/u/Steve_Hook)\
**Post date:** [February 7, 2023, 11:46pm UTC](https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817/7 "2023-02-07T23:46:56Z")

</div>

Hello, I am attempting to allow subviews for a subset of data but can't seem to get it working even following this guide. As it is, no subbview arrow becomes available so subviews can't be seen on any row.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/6/06addc3f374ceda1430a128aab2e404e4cb5a80f.png)

I am running 8.1.18

Thanks!

---

<div class="post-metadata">

**Author:** ![m.boog](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@m.boog](https://forum.inductiveautomation.com/u/m.boog)\
**Post date:** [February 8, 2023, 4:22pm UTC](https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817/8 "2023-02-08T16:22:45Z")

</div>

Good Morning Steve,

Here are a few things to try:

1. Put the fully qualified path to the view 'table' in viewPath.
2. Make the subview folder as simple as possible (mine used only the 'enabled' and 'viewPath' elements) and worked, so start there).
3. If those don't work, simplify the whole data structure to match mine in the example. Instead of adding the subview to ann existing dataset with all the extra fields, I dynamically (programmatically) created the dataset and built just what I needed in it.

Have a good day,  
Matt

---

<div class="post-metadata">

**Author:** ![Steve\_Hook](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@Steve\_Hook](https://forum.inductiveautomation.com/u/Steve_Hook)\
**Post date:** [February 8, 2023, 9:33pm UTC](https://forum.inductiveautomation.com/t/bug-1715-apply-subview-to-a-subset-of-perspective-table-rows/42817/9 "2023-02-08T21:33:03Z")

</div>

Hey Matt,

Thanks for the tips. It was indeed a formatting situation. I was able to make it work by matching your foramt by placing the entire payload into an object with a key of 'value' and then another object on the same level with a key of 'subview' with the subview parameters. It is now working as expected.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/4/94ec0486277a41e3ada55266b0c8958a38f843cf.png)
