[Solved] Getting the Row number of a particular name in Name Column of Airtable

Hello,
I want to get the Row Number of a Particular Name in the Name column…
More clearly, searching every item in column named Name, and if item = User’s Name (variable), then get it’s row number and store it in a variable…

Thanks😄

1 Like

Hi there,

If you use the Get Column block to get a Column from AirTable, you can use the following block to get the location of a given item in the list:
firstoccurence

Where the sample list is your Column.

If the name you’re searching for isn’t on the list, it will return 0.

Are your users guaranteed to have different user names?

3 Likes

Yes.
If repeated, I may prefer using ID column…

1 Like

Great! As long as each user has a unique name or ID, this block should work for you. :slight_smile:

1 Like

Thanks again!

3 Likes

Hi,

This was always my go to method and worked flawlessly, but since today it does not appear to be working as it should.

This should return my Surname, “Parkinson”. Instead it displays a blank white screen, which crashes the app, both native and web.

Now changing the rowNum to an actual number, in this case my Forename is present in #3 of the list, it returns my second name perfectly.
image

I’ve tried using math blocks to add zero to it to force it to be an integer but I’ve had no luck. I wanted to just double check here before I go to GitHub.

Thanks.

(edit)

It appears changing maxNumRows in the GetColumn block to a large number (bigger than the length of the column) shows it working. I’ve never had this problem before. I’ve had no issues using the infinity block either with this.

Curious to know was this changed?