New Row in Spreadsheet for Every User

Hello,

I am making an app that is a simple calculator. It is intended to be used by around 30 people at the same time. For each user, I would like them to have their own row in the spreadsheet. Ideally, when a new person downloads the app, a new row is created in the spreadsheet.

I am trying to utilize the sign-up email feature to create a row for every user that signs up for the app. So far, I have made the app public with email. I made a column for Signed-Up Email. I made a form button that says “Get Started” when they first sign in. In this form, I included a “Special Value” that adds the user’s email to the spreadsheet. Then, the form button disappears and they can do their calculation.

For some reason, this is not working, and the spreadsheet is not updating properly, so no new rows are being created for every email that is signed up. How do I go about doing this?

1 Like

I’d nix the form button altogether (unless you want more info than their email).

I’d just do a unique import the emails in the App: Logins sheet.

I use:

=ARRAYFORMULA(UNIQUE(LOWER('App: Logins'!B2:B)))
2 Likes

So I do have an App: Logins sheet that was automatically made by Glide, but I’m not sure what to do with it. To be more specific, this is what I’d like my sheet to look like:

When a new user signs up, a new row will be created with their [user email]. Then I have text entries for every column (canister volume, lap weight etc.) so that the user can modify their own data. The reason why I want each user to have their own row is so that they can modify their own data in each column.

Right…get rid of the cells B2 thru B4 in your sheet and insert my formula above. It will autopopulate the email addresses of those that sign in to your app.

Okay, I see, thank you. I was able to auto-populate each email that was signed in; however, I am not able to get the data in each column to be modified in their designated row. So for example, when I signed into the app with [user email 2] at B2, the values from C1:I1 were modified, rather than C2:I2. How do I fix this?

Right…the order of the emails brought in was probably different than your original order. You’ll need to manually adjust at the moment, but from here on, it should be alright.

Okay, so if I more users sign in after this, the correct C:I values will be modified in their designated row? Right now, I’m testing it with other emails, and it still only modifies C1:I1, even with a new email.

Filter your tab by signed in user using the email column. Then only the row that matches the email will be updated.

Okay; just to clarify, I went to Visibility and added the condition “Show component when Signed Up Email is signed up user”. However, this still didn’t work. I had the app open signed in with two different emails on two different phones. When I edited a C column value on one phone, it simultaneously changed it in the other phone.

Filter, not Visibility.

Perfect, that finally worked. Thank you so much!

2 Likes

Sorry, I have another question; would anyone happen to know if it is possible to make a “Reset” button so that when they click reset, every number entry will go to 0?

This would need to be a script, but it is possible.

I found a script that created a reset button in Google Sheets as an extension. https://support.google.com/docs/thread/5809954?hl=en
With this be at all helpful? If not, how would you recommend going about writing a script?

Thanks again for your help!

I’m no scripts expert…I only know a few. @George_B would be my referral!

1 Like

A little late @emvu826 but you are creating almost my Calc demo App https://multicalc.glideapp.io/

Take a look at and use it to learn a little more

Saludos
Gavp

Thank you! Were you able to make a reset button in your calculator?

@emvu826 not yet but I’m working on it!

I created my own script to reset the values in my APP but testing it I discovered that Glide writes to Google Sheets via API and the onEdit() event doesn’t recognize any Glide’s writing as trigger therefore, my script doesn’t run.

If I modify any cell manually , my script works fine but vía Glide, it doesn’t.

I have to use OnChange() instead to get it and I’m studying/searching the appropriate methods to find the right row/column and erase their values. It’s a good exercise that I haven’t considered before

I’ll be back with my reset button soon! :slight_smile:

Saludos
Gavp

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?