Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Prefill linked record in form by record ID

cancel
Showing results for 
Search instead for 
Did you mean: 
Martin_Kopischk
7 - App Architect
7 - App Architect

I am very glad Airtable has added options to the possibilities for prefilling forms, especially the ability to prefill linked records. However, it seems this functionality expects the record index string as the prefill query parameter. I’m happy to have someone point me to the right way to do this if I am mistaken, but if I am not, I would find it very useful to link records by record ID. This would make scenarios like this possible:

  1. enter the One part in a One to Many data relationship in a first form;
  2. redirect the first form to https://airtable.com/formForManyPart?prefil_link={record_id} on success;
  3. enter one Many part correctly linked to its One.

Our exact usage scenario is to allow students to request resources for a project, with the ability to add the project to our DB first if it does not exist yet. Having that newly created project linked straightaway to the requested resources in the form would take away a lot of friction.

24 Comments
W_Vann_Hall
13 - Mars
13 - Mars

I think you’ve run into the same issue that tripped me up recently. I spent a while trying to troubleshoot syntax and the like before the problem finally dawned on me.

Prefilled linked records in a form are subject to the same limitation as non-prefilled linked records: Namely, they must reference an existing record in the target table. If you prefill the linked record with a value that does not correspond to a record in the target table, the linked-record field in the form does not show the prefilled value; instead, it displays the ‘+ add’ prompt indicating the user should select a linked-record from a list of existing records. Your feature request, then, is probably better described as ‘allow a linked record to be created from a form’ — which would be handy, but which I suspect would potentially cause so many other problems I doubt we’ll ever see such a thing implemented…

Martin_Kopischk
7 - App Architect
7 - App Architect

Thanks for chiming in (and I appreciate all the sterling work you are doing on this forum), but I wasn’t asking about creation of linked records in a form; I am aware of the fact that is not possible (yet), and was in fact trying to work around it when I hit the snag leading to this post.

I might have been unclear in what I described above (my apologies, English is not my native language), but my scenario involves two forms: I first create a record in form A, then redirect to form B with the newly created record A prefilled by using Airtable’s automatic redirection on form submission feature. By definition, the new record does exist in the target table at the point we reach form B because the redirect only happens on a successful submission of form A, in which the record was created, and the redirect URL does in fact contain its record ID; it just does not work with the prefill syntax …

W_Vann_Hall
13 - Mars
13 - Mars

Oh, got it: The post-submission redirect allows you to redirect to the newly created record, but you want to redirect to a second form with RECORD_ID() as a prefilled URL variable. Yeah, that sounds like a use case no one would have predicted :slightly_smiling_face: — but, as you note, potentially quite a useful one. Thanks for taking the time to explain what you are hoping to accomplish. Upon re-reading your first post, it’s quite obvious; I suspect my initial reading was colored by the dance I had just gone through in trying to debug my own problem…

Martin_Kopischk
7 - App Architect
7 - App Architect

Just a heads up: Airtable has quietly implemented this, pre-filling forms by record ID does now work. Thanks and kudos to the team.

Felicity_Evans
6 - Interface Innovator
6 - Interface Innovator

It would be great if you could give an example o how to accomplish this. Can’t seem to find anything across the airtable support.

Martin_Kopischk
7 - App Architect
7 - App Architect

You will find all about that in the original post, including a link to Airtable’s form prefill syntax and the string to be used (just replace formForManyPart by the ID given in the link you use to share your target form).

ScottWorld
18 - Pluto
18 - Pluto

What is the exact syntax to make this happen?

I tried using this link:

https://airtable.com/{form_characters_that_airtable_gave_me}?prefill_{fieldname}={record_id_that_airtable_gave_me}

The form showed up perfectly fine, but it just typed in the actual record ID characters into the field that I specified.

And upon submitting the form, it still created a brand new record.

Martin_Kopischk
7 - App Architect
7 - App Architect

That is odd. It works in my case when I use the {record_id} template string as prefill data in the redirect URL you can indicate for a form submission (see above for how I use it to bounce between two forms). Not sure if Airtable special cases this scenario or if the record ID syntax that template stands for is not quite what I would expect it to be, but as I said, the specific scenario I outlined does work, while it did not when I originally posted.

ScottWorld
18 - Pluto
18 - Pluto

Thanks, @Martin_Kopischke. Are you using the exact same URL syntax that I posted above? Can you post the syntax you’re using?

Martin_Kopischk
7 - App Architect
7 - App Architect

Yes, I do, but for the fact that I use the template string {record_id}, not an actual, literal record ID, i.e.:

https://airtable.com/{<form ID>}?prefill_{<field name>}={record_id}