Google Sheets - Adding Data in the Same Row/Tracking

Hi, I am creating an app to track daily activity and utilizing Google Sheets as my data source. On my app I have several buttons to relate to an activity. Each time you hit a button it updates the corresponding Google Sheet with a new row entry and tallies (or should tally) the activity under its respective column or activity category.

Currently, you can click each button/activity on the app once and they will neatly organize themselves into one row on the spreadsheet and be identified by the current date. However, when you hit the button for a second time and/or even if you click multiple times, on the same day, the value fails to increase by 1.

Ideally, each time a user hits a button/activity the tally would increase by 1 on the Sheet under the respective column/activity category and only on the row entry for that current date. Essentially counting the days’ volume for each respective activity. I can not figure out how to make the value increment by 1 or if it needs to be done in Blocks or with a formula or AppScript on Google Sheets.

Attached, please find a screenshot of two of my buttons’ blocks. The “Conversations” button along with the rest of my buttons all correctly tally on one row the first time you click.
The “Dials” button when clicked does not add the current date but will tally, just the first time, under its column/activity.

  1. What appears to be wrong with my “Dial” block that it will not insert today/current date on the first click for that day?
  2. How or what is the best way to get my Google Sheet to tally the number of clicks for a button?
  3. Do you see or notice something else I may have done wrong? Any suggestions, advice, or additional resources for education will be greatly appreciated : )


Erica

Hi closinggoals, welcome to Thunkable! :tada:

Be sure to check out How to ask Great Questions v2.0, the Community Guidelines, and our Getting Started Guide to make the best of your Thunkable Community experience!

Google Sheets data will not reflect in real time. This means that when you update the Google Sheets through blocks and you try to get the data, it won’t be the value you just pushed up. All the data that will show will be the data from the Google Sheet on the first load of the app.

If you want real-time data, then I would suggest either:

  1. using a different data source
  2. have a local data source and fill it with the data from the Google sheet. When you update the data in the local data table, also update the Google one in parallel. This isn’t the most optimal, but that’s the core of the idea
1 Like

Thank you so much for the response!

This totally makes sense, do you by chance know a data source that would be better suited?

There are three options:

  1. Local data source - This one could work, but if you need to view the data outside of the app, or if you have large amounts of data, this isn’t the best option.

  2. Airtable - This is basically more fancy Google Sheets.

  3. Xano - This one isn’t a traditional data source and has a high learning curve, but if you are able to learn how to use this, it is very powerful.