Skip to main content

I am comfortable creating a prefilled form using two tables. I am having issues getting a prefilled form to work across three tables.

 

The top field in the form is a Link field between the primary and secondary tables using the recordID. Simple enough so far. But I have a third table with records that link back to the primary table. I want users to be able to select records (from this third table) in a second Link field at the bottom of the form.

 

My attempt at doing this is creating Link fields from this third table to both the primary and secondary tables, hoping the record ID would pull through to populate the selection in the prefilled form. My thinking is that the record ID for the Third--->Primary and Third--->Secondary links are the same record ID. This has not been successful. Below is an example of the formula I am trying.

 

CONCATENATE("https://airtable.com/abc/xyz/form?prefill_PrimaryField=",RECORD_ID(),
"&prefill_SecondaryTableLinkToThirdTable=",
ENCODE_URL_COMPONENT(RECORD_ID({PrimaryTableLinkToThirdTable}))
)

 

Is there a better way to do this, or something I am missing in setting this us?

Hey ​@mbwalk,

If I may suggest a different approach, I’d encourage you to give Fillout forms a shot as they are way easier to pre-fill and are way more robust than Airtable native forms (for a comparison of both, please check this article). Fillout’s free tier is all you’ll need.

Hope this helps!

Mike, Consultant @ Automatic Nation 


Hmm, so the third table is linked to the primary table, and you want to prefill it with the secondary table record’s link to the third table?  Assuming my understanding’s right, I did that by creating a lookup to display Table 2’s linked field to Table 3, and then used the following formula:

CONCATENATE(
"https://airtable.com/appmLNzPTq6TdFL1Y/shrwFK3qWmTMfEypd",
"?prefill_" & ENCODE_URL_COMPONENT("Table 2"),
"=" & ENCODE_URL_COMPONENT({Table 2} & ""),
"&prefill_" & ENCODE_URL_COMPONENT("Table 3"),
"=" & ENCODE_URL_COMPONENT({Table 3 (from Table 2)} & "")
)

Sorry, I don’t think I really understand what you’re trying to do.  If you could provide screenshots that’d be helpful!


You may also want to check out the prefilled form extension: https://airtable.com/marketplace/blkqHRSUYR2ooQyLE/prefilled-forms


Thank you for the replies. Lookup does not seem to be a good option, but Rollup might. The issue with using Rollup is an #ERROR occurs and you have to put the commas back in. This is possible with the below code. But the issue of only 1 of the linked records appearing in the form still happens. Instead of using a Rollup field, I can also just use the Link field or the Record_ID() formula to correctly call the right field. But no matter what I try, only 1 linked value shows up in the form.

So I feel I am 75% of the way there but cannot overcome the last issue.

ARRAYJOIN(ARRAYCOMPACT(ARRAYUNIQUE(values)), ",")

You might be able to get the right prefill formula by using ​@kuovonne’s Prefilled Forms Extension.

If not, you may want to check out Fillout’s advanced forms for Airtable, which makes it relatively easy to prefill multiple linked records. They also offer hundreds of other advanced form features as well, such as displaying lookup fields & rollup fields on forms, updating records with a form, and much more. They have fantastic tech support too, so they could probably guide you if you get stuck.

- ScottWorld, Expert Airtable Consultant


Ahh, yeah doing double linked records is tricky.  Try using this for your rollup instead

SUBSTITUTE(
ARRAYJOIN(values),
', ',
','
)

If that doesn’t work, if you DM me an invite link to your base I’ll see what I can do!


Reply