retrosheet icon indicating copy to clipboard operation
retrosheet copied to clipboard

Edit and delete records

Open mddanishansari opened this issue 3 years ago • 4 comments

Is it possible to edit and delete records from a sheet with retrosheet?

Google forms support editing response after submission (must be enabled in setting first), so editing might be possible. But I have no idea about deleting records.

@theapache64 have you given any thought on this?

mddanishansari avatar Feb 17 '22 20:02 mddanishansari

Yeah. Editing should be possible. AFAIK, there's no way you can delete a response, but soft delete should be manageable with a boolean flag.

Editing is something that I was planning to implement. Thanks for bringing this into notice

theapache64 avatar Feb 17 '22 21:02 theapache64

Any updates on this? Is it possible to edit a response?

M4NN3 avatar May 18 '23 19:05 M4NN3

I tried to have a look at the edit feature and did some research.

So this is currently how it can be done using Postman. When the form is submitted, in the HTML response we get an edit link which is in this format https://{GOOGLE_FORM_URL}/viewform?usp=form_confirm&edit2={EDIT_ID} EDIT_ID is important here

Now we can use that edit URL (after removing usp=form_confirm) and request it (just like writing new data) and it'll update the data.

Now the problem is that, we get the EDIT_ID only once, so in order to update data in future, we need to store EDIT_ID somewhere, which is definitely not a good idea.

Another thing I thought which might help is Google's query language but unfortunately they do not support modifying data yet.

Thoughts on this? @theapache64

mddanishansari avatar May 20 '23 08:05 mddanishansari

@mddanishansari This is great information. Let me look into this after work hours :). Will keep you posted

theapache64 avatar May 22 '23 08:05 theapache64