# Perspective Table cell view render

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868>\
**Category:** Ignition\
**Created:** [January 11, 2022, 10:56am UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868 "2022-01-11T10:56:07Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 11, 2022, 10:56am UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/1 "2022-01-11T10:56:07Z")

</div>

Hi,  
I'm using cell embedded view to render the data in a friendly way.  
Some of the raw (not all) i need a subview to display more data.  
i'm using this post to transform the input data of the table to include the subview configuration.

> [@\[Feedback\] NEW Perspective Table](https://forum.inductiveautomation.com/t/feedback-new-perspective-table/21199/48):
>
> For anyone wondering how they might be able to add custom row styles (and configuration) based upon a rows value derived from a dataset. You’ll need to create a transform on the bound dataset using a script like this example: output\_json = [] style\_orange = {"backgroundColor": "#F7901D"} style\_green = {"backgroundColor": "#00AA00"} for row in range(value.getRowCount()): row\_object = {} row\_value = {} row\_style = {} for col in r…

But the problem it's seems then dat the embedded view don't get the data as parameter and are just using the default value gived in the designer.  
When using a simple named query with the return format set to json. it's working perfectly but each row are then using the subview.

Doesn't anyone have the same issue ?  
Regards  
Arnaud

---

<div class="post-metadata">

**Author:** ![djs](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@djs](https://forum.inductiveautomation.com/u/djs)\
**Post date:** [January 11, 2022, 1:38pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/2 "2022-01-11T13:38:56Z")

</div>

What do your table props look like, and what do your subview parameters look like?

Under the _columns_ property, for the column with the subview on it - don’t put anything in _view params_. Rather on your subview give it an (object) parameter called value with values representing each row. Your subview can get the data from there.

[https://docs.inductiveautomation.com/display/DOC81/Displaying+a+SubView+in+a+Table+Row](https://docs.inductiveautomation.com/display/DOC81/Displaying+a+SubView+in+a+Table+Row)

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 11, 2022, 2:09pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/3 "2022-01-11T14:09:35Z")

</div>

I don't think we speak of the same.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/2/a268f546e1b2af4742e03bee239e13645bb57179.png)  
I use render view in the column configuration of the table to render data.  
Here above when using a query with return format set to json on the data property:  
Here the structure of the data property.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/b/bba7f310a24c240b399160b6b70a0340be9da5b5.png)

Then i apply a sript transform to include the subview configuration in the data property.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/9/e9d4f7c3938672be5f3e4b73ca9bf97a3969b5fe.png)  
With the same column configuration the view are still displayed inside the cells but with the default value set in the designer and not this the data comming from the cell.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/1/e1154bbc9e2816180737d8debc737e5bd4a103d9.png)

It seems also that the object send to the subview is different also.

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [January 11, 2022, 3:22pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/4 "2022-01-11T15:22:09Z")

</div>

What version? The view params passed to a cell configured as a view should have the shape:

```auto
viewParams = {
    ...params, // Merged params listed in the column configuration object of this column
    column, // The column name as defined in the field property of the column configuration object
    columnIndex, // The index of the column
    row, // The true index of the row relative to the source data
    rowIndex, // The visual index of the row relative to sorting, paging, and filtering
    value, // The value of the table cell
    rowData // The entire rows data as a JsonObject
};

```

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 11, 2022, 3:30pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/5 "2022-01-11T15:30:47Z")

</div>

8.1.12  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9b57d1072c8bf2844f887668395313fe94785f76.png)

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [January 11, 2022, 3:41pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/6 "2022-01-11T15:41:00Z")

</div>

Okay. We accidentally introduced a regression in 8.1.12 in regards to view cell and subview view parameters, where we were using the visual row index to fetch the view params from the source data instead of the true index of the row relative to the source data. It’s possible that you’re running into this. We introduced a fix in 8.1.13.

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 11, 2022, 4:27pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/7 "2022-01-11T16:27:28Z")

</div>

Just updated to 8.1.13 and it's still the same.  
For informations my render view parameters props is like below.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/1/e12efb27d8447f5e12e89205d93bf97476bee473.png)

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 11, 2022, 4:33pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/8 "2022-01-11T16:33:33Z")

</div>

i've try every single parameters and the only one not coming in is the value.  
All the rest is working.

i can fin a workaround by using the rowData and search for the correct data

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 11, 2022, 5:59pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/9 "2022-01-11T17:59:59Z")

</div>

@ynejati  
i've found something interesting. when i set the render mode to auto instead of view then the value is set to the render view.

i don't know if this is a bug. but this solved my problem

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [January 27, 2022, 3:48pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/10 "2022-01-27T15:48:40Z")

</div>

If you set the render to `auto`, and you’ve specified a view path, the column will assume you want to render a view. That’s expected behavior. As for the other thing you’re experiencing, I’m wondering if your configuration is just not meeting your expectations, as in, is it possible that you have it configured wrong?

Can you post the first row of data here, along with the column configuration for your column titled Transport ID, please. No need for it to be real data.

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [January 28, 2022, 1:44pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/11 "2022-01-28T13:44:20Z")

</div>

Hi @ynejati,

Here is the first row of my table  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b62d52fe1522c25851a9fcbb44790dedb296ddd6.png)

This is the column config

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/5/05b3c22cb5ee6d944f3baa9af7764f80e54c0634.png)

When render is in auto and the value transportid change, i see a direct update in the embeddedView.  
When render is in view and the value change, the new value is not set to the embeddedView.

[TestTable\_2022-01-28\_1442.zip](https://forum.inductiveautomation.com/uploads/short-url/6WYB2QmI2IDd8Kfzg5CxzkutfAx.zip) (18.1 KB)

If have made a example of a table with one column set to auto and one to view  
In the embedded view i read the value and the rowData.  
I can see that the row data is not the same between auto and view render

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/8/28a7c51a4087d5ec58ae49a565801654ea421484.png)

regards

---

<div class="post-metadata">

**Author:** ![Arnaud\_Declerck](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/arnaud_declerck/32/44872_2.png) [@Arnaud\_Declerck](https://forum.inductiveautomation.com/u/Arnaud_Declerck)\
**Post date:** [April 21, 2022, 12:44pm UTC](https://forum.inductiveautomation.com/t/perspective-table-cell-view-render/54868/12 "2022-04-21T12:44:17Z")

</div>

hi @ynejati,  
Do you have any update on this behavior?

Regards
