# Perspective Table rowIndex vs row

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-rowindex-vs-row/39501>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [October 8, 2020, 2:55pm UTC](https://forum.inductiveautomation.com/t/perspective-table-rowindex-vs-row/39501 "2020-10-08T14:55:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [October 8, 2020, 2:55pm UTC](https://forum.inductiveautomation.com/t/perspective-table-rowindex-vs-row/39501/1 "2020-10-08T14:55:59Z")

</div>

I have been looking in the documentation, and cant seem to find it, but what is the difference between rowIndex and row in the implicitly provided embedded view column parameters?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 8, 2020, 4:39pm UTC](https://forum.inductiveautomation.com/t/perspective-table-rowindex-vs-row/39501/2 "2020-10-08T16:39:28Z")

</div>

`row` is typed as `number | string`, so I guess in some circumstance it could be a string - where `rowIndex` is guaranteed to be a number.

---

<div class="post-metadata">

**Author:** ![kgamble](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kgamble/32/8019_2.png) [@kgamble](https://forum.inductiveautomation.com/u/kgamble)\
**Post date:** [October 8, 2020, 4:57pm UTC](https://forum.inductiveautomation.com/t/perspective-table-rowindex-vs-row/39501/3 "2020-10-08T16:57:45Z")

</div>

Oh alright, but they are both references to the index of a row in the data property?

For some reason I remember one of them being a reference to the number of the row visualized on the screen, but I have no idea where I got that from

---

<div class="post-metadata">

**Author:** ![catherine.fowler](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@catherine.fowler](https://forum.inductiveautomation.com/u/catherine.fowler)\
**Post date:** [November 23, 2021, 5:08pm UTC](https://forum.inductiveautomation.com/t/perspective-table-rowindex-vs-row/39501/4 "2021-11-23T17:08:32Z")

</div>

I also had the same vague recollection of one referring to what's visualized and started searching for the distinction...only to find this post and its lack of answer haha. I found documentation on this annoyingly difficult to find, especially because trying to find on a page doesn't account for content hidden under a collapsed section, which the docs use a lot of.

To save any future searchers, as it turns out, the implicitly passed `row` and `rowIndex` are indirectly described in the documentation for the `onEditCellStart` event of the table ([Perspective - Table - Ignition User Manual 8.0 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC80/Perspective+-+Table#:~:text=onEditCellStart)) :

> event.row  
> Description: The row index of the selected row (zero based).

> event.rowIndex  
> Description: The row index as it is represented in the current visible data. Useful in cases where some of the rows are hidden, such as when filtering.

I found these descriptions to be consistent with what I was having implicitly passed. If I filtered my table to one element, it would register a `rowIndex` of 0 regardless of what its actual row in the dataset was, whereas `row` gives the actual spot in the dataset. **This is important to be aware of if you plan to enable filtering or sorting and want to update table values.** If you update values based on `rowIndex`, things will look like they work until you sort/filter, then you'll be updating things practically at random! (Found that out the hard way...time to go fix up my dataset)
