Help

Re: Update existing record via form without creating new record

3213 0
cancel
Showing results for 
Search instead for 
Did you mean: 
mhaulmark
4 - Data Explorer
4 - Data Explorer

Hello, I am trying to update an existing record with a form without it creating a new record.  I have attempted this several times using automation but I am having no luck. Any suggestions?

4 Replies 4

Form submissions will always create a new record, so the best you can do is delete the newly created record after you've used the data in it.

Do you have a Pro plan?  If so, you can add a "Run a script" action and write some JavaScript that will delete the form submission once you have utilized the data in the form submission to update the existing record.  There are some examples of the code that can accomplish this in the forums and you can search for it

If you do not have a Pro plan then you could attempt to use a third party tool with some JavaScript to delete the record the form submission created

paulo
6 - Interface Innovator
6 - Interface Innovator

A workaround is to use a form that integrates with Airtable. We have built a form allowing you to edit a record in Airtable.

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

Using a formula field, you can generate a unique URL for each record and opening this URL will allows you to update existing record.

ScottWorld
18 - Pluto
18 - Pluto

@mhaulmark 

There is a 100% free solution for accomplishing this, and it also happens to be the easiest way as well. The answer is Fillout’s advanced forms for Airtable, which allows you to update Airtable records with a form.

You can also do it natively in Airtable (for free as well), but the problem of doing it in Airtable is that Airtable forms always create new records (they never update existing records), so you’ll need to do some zany workarounds to make it happen.

So, to recap, these are your 2 ways of doing this:

1. The hard/complicated/unreliable way which is not recommended: You can have your Airtable form feed into an additional table that acts as the repository for all of your form submissions, and then you can create an automation in Airtable that finds the original record in the original table and updates the original record with the data from the form. You would also need to prefill the form if you want users to see existing data, which can get quite complex and doesn’t support attachment fields. This requires giving your users a brand new prefilled form link every time they want to update their form. You can see why most people don’t want to use this method.

2. However, the much quicker, much easier, much more elegant, much more customizable, and much more reliable & bulletproof way to have a form that updates existing Airtable records is to simply use Fillout's advanced forms for Airtable. You wouldn't even need to prefill the form because it automatically pulls in all the record data that you'd like to see on the form.

Fillout for Airtable is 100% free, and it offers over 100 advanced form features that Airtable's native forms don't offer, such as updating Airtable records from a form, displaying formulas & lookup fields & rollup fields & attachments on forms, allowing dynamic linked record filters (i.e. dynamic dropdown selections), the ability to have multi-page forms with conditional paths, the ability to create new linked records on a form, the ability to accept payments on forms, visually displaying as many fields as you want to see in a linked record selection list (including attachment fields), limiting the number of linked records that can be chosen, and much more.

p.s. If you have a budget for your project and you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consulting — ScottWorld

brdemers
5 - Automation Enthusiast
5 - Automation Enthusiast

The actual free solution - you're going to need an automation & some new fields

1. Make a new single line text field and call it 'RECID' (or whatever you want)

2. Make a new button field and use the following formula

CONCATENATE('YOUR FORM URL','?prefill_RECID=',RECORD_ID())

NOTE: end goal is to prefill your target record ID somewhere in the form do this how you want, I just have a button to clean up the interface for clients) 

3. Make sure your RECID field is somewhere in your form (hidden is fine) 


MAKING THE AUTOMATION 

Screenshot 2024-10-28 at 4.19.24 PM.png
TRIGGER: When a form is submitted 

1. Update record 

*table = your table 
* record ID = That new 'RECID' field! (mine is called CONTENT_RECID in the SS)
* fields = whatever fields the form is updating

2. Find Records 
Find based on a condition where Record ID IS the @airtable record ID from your form submissions (NOT your custom field) 

3. Run a script 

const table = base.getTable('TABLE NAME);
const recordsToDelete = input.config().recordIds;
table.deleteRecordsAsync(recordsToDelete);

On the left for input variables, it'll ask you to add something. 

name = recordIds 
value = the record id from the find a record step. 

Thats it! Sorry this is so long I just literally spend a GD month looking for the answer thought i'd save someone some time in the future.

(For my SMMs, this is a workaround to share content with clients and let them approve via a form without having to login or use up a paid account. I have a full content management system, including automations for importing content and scheduling via airtable if you're interested info@saronamarketing.com ) 

Thanks! 

 Screenshot 2024-10-28 at 4.19.10 PM.png

HUGE shoutout to https://www.youtube.com/watch?v=hNsPTMe_pso for the script

Manually deleting Airtable records can be a pain 😖 - especially in common situations like deleting tasks for a cancelled project. But there IS an easier way to do it, and thats what we're talking about in this video. Follow along as we setup an Airtable automation using a simple script to ...