Help

Re: Button to run a script that deletes the record

3140 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Luke_Concannon
6 - Interface Innovator
6 - Interface Innovator

I need read-only users to be able to click a button and delete a record. I am just about to start learning JS (how many people are saying that now Airtable Scripting exists!) but currently have no coding knowledge!

Can anyone help with a script I can run on a button being clicked to delete the relevant record? Thanks in advance!

8 Replies 8

Writing that script would be easy except I’m pretty sure read-only users wouldn’t be able to use it. Either a user can edit/delete a record by any means or they can’t.

I was worried about that. Ok, will just have to wait till our Stacker solution is all setup. Never mind!

Thanks for your response Kamille.

Any chance you could provide me the script so I can test to confirm?

Straight from the Scripting documentation: table.deleteRecordAsync(recordId)

You could have a button that opens an Airtable form prefilled with the record id of the record to be deleted. The user submits the form, then have an automation script trigger do the actual deletion.

That’s definitely one way to do it. Very, very clever.

Thanks Kuovonne. It’s a great workaround. Unfortunately the impact on user experience outweighs the functionality - I think we’ll have to get an initial front end setup via Stacker to cater for our need to accomodate read-only users updating and deleting records.

Thanks for your help

paulo
6 - Interface Innovator
6 - Interface Innovator

Another workaround is to use a form that integrates with Airtable. We have built a form that allows you to view the record in the form and have the option to delete the said record.

https://miniextensions.com/miniextensions-form-for-airtable/

Our form will generate a formula that will create unique URL for each record in Airtable. Clicking this URL will load the record in the form. Now, you must have enabled deleting the record. The delete button will show up at the bottom of the form.

paulo_0-1702038764640.png