How can I find out the row number in GoogleTable?

Hello community! How can I find out the row number in GoogleTable if I know the key (“uuid”) unique identifier of the row?
Google Таблицы - Google Chrome 2021

Hey @Roket,

You can use the following code snippet

const uuid = 2;

const rowNumber = items.findIndex(i=> i.json['uuid']===uuid)+2;


return [{json:{rowNumber}}];

You will have to update the value for uuid. This can be the uuid you want to return the row number for.

Also, you can notice that I am adding the returned value with 2. The reason for this is that since it is an array, it starts with the index 0 (your first row becomes 0, the second row becomes 1, and so on). The first row in your sheet contains the column names, hence we need to consider that value as well.

I hope this is helpful.

1 Like

@harshil1712, Thanks for the quick response! I will check later and report the result.