Google app script to overwrite a record

I am new to Google app script. I have created an app which is periodically writing data to a google sheet. It is being used by 5 - 10 users. Aim is that whenever any user sends data to the google sheet, his previous data should get deleted and new one written, in otherwords it should overwrite. I am totally clueless how to go about it. There is a column where Name of the sender is being stored.

CRUD with Google Sheets, Web App and AI2
(as an example)

Use the update procedure

TIMAI2 Tx for your response.
While publishing the app script, I am getting this error.
Why is this ? and how do I resolve it ??

The android app I made is a simple application where multiple users using this app will upload their GPS coordinates based on a time interval to a google sheet. I need ONLY the LAST received coordinates of each user to be saved in the google sheet.

My blocks are under : -

This is the second instance of this happening to someone when using my script. I do not know why, because it doesn't give me any problems. The other user had to start again, new spreadsheet and new script, and the problem went away. Make sure you give permissions correctly to run the web app.

1 Like