# Umm... what is going on with =UNIQUE?

**URL:** https://community.glideapps.com/t/umm-what-is-going-on-with-unique/7257
**Category:** Ask for Help
**Created:** [April 17, 2020, 9:24pm UTC](https://community.glideapps.com/t/umm-what-is-going-on-with-unique/7257 "2020-04-17T21:24:06Z")
**Posts on this page:** 3
**Page:** 2

<div class="post-metadata">

### Author: ![Lucas\_Pires](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lucas_pires/32/64863_2.png) [@Lucas\_Pires](https://community.glideapps.com/u/Lucas_Pires)
#### Post date: [April 18, 2020, 3:38pm UTC](https://community.glideapps.com/t/umm-what-is-going-on-with-unique/7257/21 "2020-04-18T15:38:05Z")

</div>

I rewatched your video here and, got it… I have to call a sheet and select the fields i want **before** any login! Thanks!

---

<div class="post-metadata">

### Author: ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)
#### Post date: [April 18, 2020, 4:12pm UTC](https://community.glideapps.com/t/umm-what-is-going-on-with-unique/7257/22 "2020-04-18T16:12:44Z")

</div>

Correct!

---

<div class="post-metadata">

### Author: ![John\_Cabrera](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/john_cabrera/32/2066_2.png) [@John\_Cabrera](https://community.glideapps.com/u/John_Cabrera)
#### Post date: [April 18, 2020, 9:38pm UTC](https://community.glideapps.com/t/umm-what-is-going-on-with-unique/7257/23 "2020-04-18T21:38:50Z")

</div>

The problem I’m having is when writing any additional data to a newly created row. I’m just using a pretty simple sheet.getRange(lastrowNun,columnNum).setValue(‘to absolutely anything at all’); and that simple script action causes an extra line to be added under it. If the function is triggered after the new row has already been added, it writes to that row perfectly with no added row. But if I want the onChange trigger to write that data the moment it comes in, the new row adds. This doesn’t happen with any other data that comes in from forms on other sheets. I have content being added as new rows to other sheets and the same onChange trigger causes the same function to write some additional data to those new rows without adding a new line. So I really can’t figure this out.

Currently my work around is to let the data finish writing and then have a final deleteRow(lastrowNum + 1) action clean that row up. But it’s hacky and could cause big problems if two people log in to the app at around the same time.

[Previous page](https://community.glideapps.com/t/umm-what-is-going-on-with-unique/7257.md?page=1)
