# How do I find out which table row is clicked in Kintone?

**URL:** <https://forum.kintone.dev/t/how-do-i-find-out-which-table-row-is-clicked-in-kintone/216>\
**Category:** General\
**Created:** [December 14, 2021, 11:24pm UTC](https://forum.kintone.dev/t/how-do-i-find-out-which-table-row-is-clicked-in-kintone/216 "2021-12-14T23:24:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [December 14, 2021, 11:24pm UTC](https://forum.kintone.dev/t/how-do-i-find-out-which-table-row-is-clicked-in-kintone/216/1 "2021-12-14T23:24:46Z")

</div>

I have a Kintone Table with field code “machinelist”.

I want to find out which table row the user clicks.&nbsp;

Does Kintone Table have built-in function to find out which row is clicked? I tried “rowIndex” but does not work. Please help !!

&nbsp;

var t = kintone.app.record.getFieldElement(“machinelist”);

&nbsp; &nbsp; &nbsp; &nbsp; if (t) {

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (window.addEventListener) {

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t.addEventListener(“click”, function () {

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.prompt(“testing…” + t.rowIndex);

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else {

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t.attachEvent(“onclick”, function () {

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; window.prompt(“testing” + t.rowIndex);

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }

&nbsp; &nbsp; &nbsp; &nbsp; };

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [December 16, 2021, 5:42pm UTC](https://forum.kintone.dev/t/how-do-i-find-out-which-table-row-is-clicked-in-kintone/216/2 "2021-12-16T17:42:58Z")

</div>

Hi Annaylee,

&nbsp;

Could you tell me whether you are trying to see where the user has clicked on a field within the table or on “+/－”?

The processes for both are very different.

&nbsp;

Also, getFieldElement is only available in the record detail screen and print screen, so I’m wondering where it’s being processed.

&nbsp;

Thank you,

Sean
