Is there a way to "get row number/id" using a row attribute?

Dacia Bowman
Dacia Bowman ✭✭✭
edited 06/19/24 in API & Developers

I am processing a set of parent/child rows via a set of Alteryx workflows and I have the possibility of adding/updating rows to a SmartSheet grid in the process via the download tool / SmartSheet API. Trouble I am running into is that the original row number obviously changes if I add a row - currently doing a GET each time I start processing the row as it could have changed. This is adding time to an already slow process. Is there any way to get current row number based on a key field in the sheet?

For example - currentRowNumber = getrow("key")

Answers

  • bisaacs
    bisaacs ✭✭✭✭✭

    Hey @Dacia Bowman,

    Could you add an auto-numbering column that's hidden on the sheet view, but is accessible to the API? Once the # is assigned to the row it doesn't change, so that could act as your key field?

    If my response was helpful in any way (or answered your question) please be sure to upvote it, mark it as awesome, or mark it as the accepted answer!

    I'm always looking to connect with other industry professionals, feel free to connect with me on LinkedIn as well!

  • @bisaacs - I already have a unique key field - just need a way to get the current row ID or Number based on that key field. I can't use a auto number because the row number can change if I add rows as I process.

    For example - 10 rows in tracker. I process the first row and I add 2 rows. Row 10 is now row 12 and I have to currently to a GET SHEET with API to determine new row numbers to update correct row. Doing GET SHEET via API takes longer and longer the more rows in the tracker.