# New Row in Spreadsheet for Every User

**URL:** <https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475>\
**Category:** Ask for Help\
**Created:** [April 5, 2020, 11:29pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475 "2020-04-05T23:29:59Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [April 8, 2020, 8:51pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/25 "2020-04-08T20:51:38Z")

</div>

@Wiz.Wazeer  
I can’t clear your fields when I press 0%… Am I doing anything wrong?

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/4/4d00cb9b8adb6eaa9dacaba3250d56cc764c460c.png)

I can see that you have a similar Calc like mine so, can you replicate our case trying to clear your 2 fields using your trick?

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/5/5501ce9493db2cdd0aec31b75cdfea41c1dc23c5.png)

Thanks in advance

Saludos  
Gavp

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [April 8, 2020, 9:52pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/26 "2020-04-08T21:52:04Z")

</div>

@emvu826

According to what I have read and studied so far, there is no way to create a direct button (from Glide) able to fire a script into Google Sheet.

The workaround is to use a timed trigger but you’d wait up to 3 min to see the event you are wishing… I don’t like that idea!

Maybe @George_B or @Jeff_Hager have seem this problem earlier and have other solutions but to me, this kind of problem can be solved easy if the **If-Then-Else** tool will be able to write to another column (cell) directly.

A medium modification in its capability will be a amazing!!

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/b/b1f4251576a7f00c4dd43af3d271ac40fa0643eb.png)

In my pic, the action could be read as:  
**If** My Reset Button (_ResetButton_) **is** ON (set to TRUE) **Then** Cell D (_MyField_) will set to 0

With this, the problems associated to triggers in Google Sheets will decrease and we’ll save a lot of time.

Any other suggestion is welcome!

Saludos  
Gavp

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [April 8, 2020, 10:28pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/27 "2020-04-08T22:28:41Z")

</div>

Refresh the screen. Mine clears the percentage fields not the other entry fields. If you want to clear all entry fields you have to set the 0 to clear all entry fields. I’ll send you an example.

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [April 9, 2020, 1:26am UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/29 "2020-04-09T01:26:02Z")

</div>

We’re releasing this next week!

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [April 9, 2020, 1:54am UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/30 "2020-04-09T01:54:56Z")

</div>

David, so do I not get a treat for launching the RESET button before you guys!!!

---

<div class="post-metadata">

**Author:** ![david](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david/32/62831_2.png) [@david](https://community.glideapps.com/u/david)\
**Post date:** [April 9, 2020, 2:03am UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/31 "2020-04-09T02:03:22Z")

</div>

Oh no, I was commenting on the title of this topic—new rows for new users.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [April 9, 2020, 2:04am UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/32 "2020-04-09T02:04:24Z")

</div>

🤣

---

<div class="post-metadata">

**Author:** ![emvu826](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@emvu826](https://community.glideapps.com/u/emvu826)\
**Post date:** [April 9, 2020, 3:04am UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/33 "2020-04-09T03:04:29Z")

</div>

HI Wiz,  
May I see the behind the scenes of your reset calculator app? Or allow people to copy the template?

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [April 9, 2020, 10:43pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/35 "2020-04-09T22:43:36Z")

</div>

> **[CALCULUS](https://calculus.glideapp.io/)**
>
> RESET BUTTON INTRODUCED

Okay you can download and copy. I’ve set template to anyone can copy. Gave it a funky name too. Do what you want with it. Tx.

---

<div class="post-metadata">

**Author:** ![emvu826](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@emvu826](https://community.glideapps.com/u/emvu826)\
**Post date:** [April 9, 2020, 11:59pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/36 "2020-04-09T23:59:05Z")

</div>

Wow, I am blown away…So I am looking at your data trying to understand the “Home” sheet and the “Options” sheet. I see that in your Home sheet, you have two columns both called Reset. Then in your options sheet, you have two columns called “Calculator” that both have the word reset in it. How exactly does this reset the entry fields? I’m not sure how this works; seems like magic to me.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [April 10, 2020, 12:36am UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/37 "2020-04-10T00:36:55Z")

</div>

@Wiz.Wazeer … you are a clever cheat guy! 🤣

Great trick, no doubt. You deserve a corona but the beer not the virus 🙂

@emvu826, his trick was to force an error in the Number Entry components writing “RESET” in their cells. Due to it is a text and not a number, the components become “empty” and their values disappear on screen causing a kind of reset.

Good job friend, today I learned something new!

Hoy eres un crack!! …saludos  
Gavp

---

<div class="post-metadata">

**Author:** ![emvu826](https://avatars.discourse-cdn.com/v4/letter/e/0ea827/32.png) [@emvu826](https://community.glideapps.com/u/emvu826)\
**Post date:** [April 10, 2020, 12:38am UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/38 "2020-04-10T00:38:40Z")

</div>

I see; brilliant! I wonder if there is any way to make a single button that clears all of the entry fields at once?

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [April 10, 2020, 12:56am UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/39 "2020-04-10T00:56:21Z")

</div>

Thank you friends. Really appreciate the feedback. I’ll let you think whatever you wanna think 😇 But, you missed the relevance of the key 0. The magic is in the 0. You will understand it soon. Play around with it. Yes, you can make a single reset button. But I want you to have ago. A clue is the options sheet. But pls play around with it. Master the 0 and Glide is your oyster.

---

<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:** [April 10, 2020, 3:42am UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/40 "2020-04-10T03:42:47Z")

</div>

I feel like I’m over-analyzing this. The concept seems pretty straight forward and I understand how it works, but I don’t understand the extra reset column and the extra options column. I removed both and it still works. I’m also not following the relevance of your mention of 0. I get that 0 \* 0 is 0 but how does that come into play with the extra reset column. Especially since I removed it with no effect. Maybe as a developer I’m thinking too hard and looking for something that’s already clear to me. Anyway. Nice work.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [April 10, 2020, 4:52am UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/41 "2020-04-10T04:52:37Z")

</div>

Tx for the feedback.

Some of the columns would come into play when creating a single reset button but not necessary as other ways exist to exploit weaknesses of the 0 field. 0 is always key for me because all number fields are based on the base 0. Even though we don’t see it, all number fields return 0. We replace it by entering other digits. But as an empty cell it’s 0. They only way you can manipulate a number cell to return a blank screen (not 0) is by disabling the 0 completely. I wouldn’t call it cheating or hacking the number field, but to be more precise “disabling” 0 completely by overriding it with something that does not belong to the numbers family. Best is always text given 0/1 conundrum (bits). As for the 0_0, it’s true I didn’t make any use of it but it’s a fool proof way of checking things. If you check my lawcap intro app you will notice i don’t clear the percentage fields by disabling the number field with text. I in fact deployed 0 to achieve the same end. So 0 is always key. It’s a bit more complicated than that but hopefully I will be able to show you and all our community members with working examples of the power of 0_0 in due course.

The only reason I was able to make this look simple and straightforward I would say was becz of my understanding of the function of 0 in number fields.

Tx and btw I found your concepts app really helpful, and plan to put the concepts to good use.

---

<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:** [April 10, 2020, 12:04pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/42 "2020-04-10T12:04:46Z")

</div>

> [@gvalero](#):
>
> Therefore, any change made via Sheets API or Apps Script will not fire onEdit or onChange

Setting a trigger to work onChange works fine when data is submitted from Glide guys the api. I use it to copy some data from one sheet to another, so I know it works and don’t see a reason why it couldn’t be used to create a reset function with a switch, checkbox, or choice component. There would be a bit of a delay though, because the changed value would have to be updated on the sheet, the trigger activated to run the script and clear all fields (including the one that activated the trigger), then the update data returned to Glide. Most likely wouldn’t take more than a few seconds, but wouldn’t be instant like @Wiz.Wazeer’s example. onEdit will not work because as you kind of indicated, the change is happening via the api instead of the directly in the sheet. onEdit only appears to work with edits made directly in the sheet.

> [@gvalero](#):
>
> According to what I have read and studied so far, there is no way to create a button (from Glide) able to fire a script into Google Sheet.

@Wiz.Wazeer’s use of the choice component as a button is kind of brilliant. This allows for direct entry of a value to the sheet like a switch or checkbox, but it looks better. In some cases you can use Zapier to perform many functions that a script would, but a script would ultimately give you more control.

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [April 10, 2020, 1:03pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/43 "2020-04-10T13:03:52Z")

</div>

no @Jeff_Hager a write action made by Glide doesn’t fire onEdit or onChange triggers in Google Sheet.

Unless you are using a undocumented parameter o trick (which I will want to see it 🧐) none script will run under this scenario (API)

Try using this harmless code to test OnChange(e) event:

_function OnChange(e)_  
_{_  
_Browser.msgBox(“Something changed!!”);_  
_SpreadsheetApp.getActiveSpreadsheet().toast(e.changeType)_  
_}_

Even, if you create manually a new row, change a cell color o erase any cell, my script will run fine but instead, if you use Glide’s Data Editor to create a new basic column in Google Sheet you will see how your new column is created perfectly in 2-3 sec but the above script never ran.

Let me know your results to compare and know a little more about this.

Thanks in advance  
Saludos

---

<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:** [April 10, 2020, 1:44pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/44 "2020-04-10T13:44:18Z")

</div>

You have to create a trigger for the script. Then it will work. In the trigger you specify which function you want to call. You set up the trigger using the highlighted icon in the attached image. Not by naming your function onChange. You can name the function whatever you want and the trigger will call it.

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/3/3516b8e01355c2102f62ac8f759db38b2bb5f864.png)

---

<div class="post-metadata">

**Author:** ![gvalero](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gvalero/32/1037_2.png) [@gvalero](https://community.glideapps.com/u/gvalero)\
**Post date:** [April 10, 2020, 2:43pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/45 "2020-04-10T14:43:18Z")

</div>

I see your reply and I am felling like a high school student! 🤣

I know how to set up a trigger and associate it to a script my friend, don’t worry about it but anyway, here you can see my settings (in spanish… sorry!)

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/0/0f5dca809a4adc3746c1b0fae0cc75058bd7e000.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/c/ce18b4a021feaa31eaa3b57f0c3a4e4ef9ca9bb4.png)

but did you carry out the test? Were you are able to run the script (mine or any yours) successfully with an OnChange() event?

Thanks again  
Gavp

---

<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:** [April 10, 2020, 5:09pm UTC](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475/46 "2020-04-10T17:09:31Z")

</div>

I haven’t tried your specific example, but I’ve been doing this with my app for the past year and it works fine. A record can be added from the app and it automatically fills data in other sheets for me. I don’t have the sheet open and the trigger works fine. Your script might be different because you are trying to show a toast message in the browser window instead of performing some other action.

Here is an old post with the script I’m using. It runs with the onChange Trigger;

> [@Email registration reference](https://community.glideapps.com/t/email-registration-reference/2156/2):
>
> App:Logins would be the place to get emails. You can use a UNIQUE formula in a new sheet to build a list, but you could run into problems if have other columns in your new sheet that need to match up to the email being pulled from App:Logins. I wouldn’t trust googles UNIQUE function in this case. Things can get out of whack if you’re not careful, as the order of emails could change. Instead I would use a script that will check for unique emails and apply them to another sheet. I use the fol…

These are the trigger settings I’m using:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/d/d3fae575835e087ccb63db1ec14767c49e45149a.png)

[Previous page](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475.md?page=1)

[Next page](https://community.glideapps.com/t/new-row-in-spreadsheet-for-every-user/6475.md?page=3)
