Help

Generate URL for form that allows editing of an existing record

Topic Labels: Views
3780 4
cancel
Showing results for 
Search instead for 
Did you mean: 

Hope I’m putting this in the right forum. I could swear that, a long time ago, I saw Gareth Pronovost demonstrate how you can generate a URL that will load an existing record into a form so a user can edit it. All I recall really recall is that it involves getting the record ID into the URL. But I’ve been searching for how to do this and can’t find it.

I’m talking about a technique that does not require anything outside Airtable. I already know how to do this using miniAutomations (and that works great). But I’m trying to do it without miniAutomations or any other helper service.

Anybody able to throw me a clue?

Added a minute later: To be clear, I’m NOT talking about prepopulating fields in the form. I know how to do that, too, using ‘prefill_’ and encoding the URL. When you do that it simply prepopulates certain fields with values, but when user hits Submit it creates a new record. I want to edit an existing record and then save the changes to the same record.

4 Replies 4

Gareth has two such videos that I could find on his channel. The older one (from a couple of years ago) uses FormNano, but one that was posted just two months ago is probably the one you’re looking for:

THANKS, Justin! That’s exactly what I was thinking about. Couldn’t remember the technique but as soon as Gareth mentioned creating a second utility table called “Updates” it all came flooding back. Exactly what I was looking for. Thanks again.

William

Here is a variation on this method that does not involve creating an updates table:

  • Create a new single line text field for the {Original Record ID} of the original record. Add a description indicating to never manually enter data in the field because it is used by this system, and hide the field from most views.
  • Optionally use a multi-select field to indicate the fields to update.
  • Create the updates form in the same table.
  • Use the Prefilled Forms app to built the formula for the button, prefilling the new single select field with the record id. (Note that you do not need to create a record id field.)
  • Have the automation trigger on the condition when the {Original Record ID} field is not empty.
  • Have the automation run a scripting action that updates the original record (based on the {Original Record ID} field) with the values in the new record, then have the script delete the triggering record.

How it works:

  1. Clicking the button opens the prefilled url. The button works even in shared views.
  2. Submitting the form creates a new record.
  3. The automation script performs the update, and cleans up the new record.

Advantages of this system:

  • You don’t need an updates table.
  • You don’t have to match field types with the “updates” table, and if you change field types (such as adding a new multi-select option), you don’t have to change them in multiple places.
  • If you have linked records, you do not need extra linked record fields in the linked table.
  • You don’t have extra “update” records counting against your record limit, but you can still see all of the changes to the record in the record history.
  • Use only one automation for all fields that need updating, versus a new automation for each field to be updated.
  • The script can include logic to either update fields to blank values or to only update fields that are not blank.

Disadvantages of this system:

  • You need a scripting automation, so it will only work on Pro workspaces.
  • Unless you want the script to update only fields that have values, the script needs to be customized to your base.

If you want such a script but are not up to writing it yourself, schedule an appointment with me to discuss your script writing needs.

Thanks Kuovonne. Have bookmarked this and will review it later, and I’m sure this will be helpful to others as well. These days I assume that I can do lots of things with javascript – but I’m a die-hard and trying to see how far I can go without it.

William Porter / Technology
Dallas, Texas