# Get row number in a field

**URL:** <https://community.glideapps.com/t/get-row-number-in-a-field/35472>\
**Category:** Ask for Help\
**Created:** [December 3, 2021, 3:34pm UTC](https://community.glideapps.com/t/get-row-number-in-a-field/35472 "2021-12-03T15:34:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mzsadiek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mzsadiek/32/36021_2.png) [@mzsadiek](https://community.glideapps.com/u/mzsadiek)\
**Post date:** [December 3, 2021, 3:34pm UTC](https://community.glideapps.com/t/get-row-number-in-a-field/35472/1 "2021-12-03T15:34:09Z")

</div>

Hi,

Currently, whenever an entry is added through a form on a app, I insert this formula with Zapier (it’s in dutch):

=IFS(B42=“ContentA”; IFS(ISLEEG(E42);TEKST.SAMENVOEGEN(D42;" “;F42);NIET(ISLEEG(E42));TEKST.SAMENVOEGEN(D42;” “;E42;” ";F42)); B42=“ContentB”; C42;B42=“ContentC”; C42)

However, I want this formula to be added quicker to the row so the value can show up a few seconds quicker in the app. I use Zapier for this because I can insert the row number. So in Zapier, I have B for examples, which becomes B42.

Any way to do this in Glide, so I don’t have to use Zapier to add this formula? I need a way to get the row number of the added entry or a way to calculate the total number of rows before adding to add +1 to it, for example.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 3, 2021, 4:01pm UTC](https://community.glideapps.com/t/get-row-number-in-a-field/35472/2 "2021-12-03T16:01:19Z")

</div>

If your end goal is to get an auto-incrementing number, here is a method you can use that is pure Glide.

> [@Unique Numbers](https://community.glideapps.com/t/unique-numbers/35039/8):
>
> Here you go…

---

<div class="post-metadata">

**Author:** ![mzsadiek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mzsadiek/32/36021_2.png) [@mzsadiek](https://community.glideapps.com/u/mzsadiek)\
**Post date:** [December 3, 2021, 7:38pm UTC](https://community.glideapps.com/t/get-row-number-in-a-field/35472/3 "2021-12-03T19:38:27Z")

</div>

Your solution works, and I have the correct formula with row numbers in Glide. However, when added to Google Sheets, it is added with an ’ at the start, which causes it to not transform to a formula but just plain text. How do I fix this?

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [December 3, 2021, 7:48pm UTC](https://community.glideapps.com/t/get-row-number-in-a-field/35472/4 "2021-12-03T19:48:10Z")

</div>

Check the column type in Glide and make sure it’s a number type.

But, what is the formula for?  
The solution I gave you doesn’t require any formulas.

---

<div class="post-metadata">

**Author:** ![mzsadiek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mzsadiek/32/36021_2.png) [@mzsadiek](https://community.glideapps.com/u/mzsadiek)\
**Post date:** [December 3, 2021, 7:54pm UTC](https://community.glideapps.com/t/get-row-number-in-a-field/35472/5 "2021-12-03T19:54:03Z")

</div>

The formula I posted at the start of this topic is the formula I want to add to a field—every time a new entry is created. Thanks to your comment, I was able to get the formula with the correct row numbers. However, I now need to ensure that the formula is parsed correctly in Google Sheets.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 3, 2021, 8:14pm UTC](https://community.glideapps.com/t/get-row-number-in-a-field/35472/6 "2021-12-03T20:14:49Z")

</div>

I think the whole point was to build the resulting column value in glide. Not build the formula for google to do the work to get that resulting value. If you build all of the logic in glide, then you will not have any of the lag you were worried about when waiting for glide and google to resync.

---

<div class="post-metadata">

**Author:** ![mzsadiek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mzsadiek/32/36021_2.png) [@mzsadiek](https://community.glideapps.com/u/mzsadiek)\
**Post date:** [December 4, 2021, 9:18am UTC](https://community.glideapps.com/t/get-row-number-in-a-field/35472/7 "2021-12-04T09:18:12Z")

</div>

Yes, you’re right, I thought the formula would be more straightforward, but it ended up being more work, so I replaced the whole formula with some columns, which now does precisely the same. Thanks for your help!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [December 5, 2021, 9:18am UTC](https://community.glideapps.com/t/get-row-number-in-a-field/35472/8 "2021-12-05T09:18:26Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
