New Row in Spreadsheet for Every User

That’s awesome! Good luck with the script writing - hope you can figure it out!

Thank you for sharing your app! When I press 0%, is it able to clear the entry fields too, or is does it just clear the calculation at the botttom?

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

image

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

Thanks in advance

Saludos
Gavp

@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

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

1 Like

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.

We’re releasing this next week!

3 Likes

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

1 Like

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

1 Like

:rofl:

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

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.

4 Likes

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.

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

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

@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

1 Like

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

Thank you friends. Really appreciate the feedback. I’ll let you think whatever you wanna think :innocent: 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.

1 Like

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.

2 Likes

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 00, 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 00 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.

2 Likes

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.

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

1 Like

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 :face_with_monocle:) 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

1 Like

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