[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.

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?

eoin,

surname is one of value in column forename?

Hi, yes I had this set wrong too however there was still something weird happening with Airtable at the time. I’ve had no trouble since with this component.

Thanks!

1 Like

thanks a lot. i am looking something like this but let me try if it was what i imagined.

1 Like

eoin,

i try to get something similiar but my block does not seem right.

i want get list of number (column) base on other status (column) which is contain “Register” and want to list it at listviewer.

here is my block.

What if i they dont?
I need to get different values from a column where the same name might be shown.

Any improvement with this? I just rann into same problem. Cells not updating. see attached image of blocks.