Prefill linked record in form by record ID


#1

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.


#2

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…


#3

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 …


#4

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 :slight_smile: — 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…