Help

Re: Prefill from field with another table field content

3037 5
cancel
Showing results for 
Search instead for 
Did you mean: 
yuval_hass
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey,

I have a form and I wish to auto-fill a field with content in another table.
It’s already linked to another table and I want to have a specific info auto-filled.

How it’s done right?
Thnaks

16 Replies 16

Hi @yuval_hass and Welcome to Airtable!

Once you’ve linked the two sheets together, you can now add all sorts of functionality between the two sheets. What you’re looking for is the LOOKUP column. Create a LOOKUP column in your first sheet.
In the configuration, select the column that is currently linked to the other sheet and then below that, select the field in the other table that you’re looking to pull in.
image

Here’s the base if you want to copy and play around with it.

0d41b7239ab01c5f5e8f76a7f7d714f76ba86a36.png

Linking Basics - Airtable

Explore the "Linking Basics" base on Airtable.

@yuval_hass: Here’s the info on prefilling form fields:

Thanks, prefilling of content works fine but not a value that lives in another table.

That’s where the suggestion from @Nathalie_Collins comes in. You’ll need to link/lookup the field you want to bring it into the table containing your form.

Hey,
I’m not looking for lookup solution
I want to prefill several form fields with a value.
it’s already linked to another table and giving values using the URL doesn’t work :frowning:

any idea?

Could you share more details about the URL you’re trying to use when prefilling the form? Perhaps there’s a problem with the URL.

Thank you Justin

when its a text box I can easly use the prefil url parameters.
When it’s anoter entity we get a + sign on a button… clicking that open a new window and I can choose the parameter I wants.

what do you think?

If I understand you correctly, you’re saying that when trying to prefill a field that’s a link to another table, it’s not prefilling the entry, and you still have to pick the item manually. Is that correct? If so, then there may be a problem with how you’re building your form URL to prefill the field. I just ran a quick test with prefilling a linked field, and it worked fine.

Could you share the URL you’ve built? If you don’t want to share the URL for your actual project, perhaps make a quick temp table and form that you can use to demonstrate the problem.

Thanks justin
it works!!

May I ask how you got it to work? I’m now stuck on what I believe to be the same problem

May I ask how you got it to work? I’m now stuck on what I believe to be the same problem

image
I’ve succeeded in prefilling the “Name of broker” field with ‘Clark Kent’, but i’m also trying to prefill the ‘individual_being_reviewed’ field (a linked field) with a selection from that other table. I’m just trying to pre-fill (or pre-select to be more precise) with an option. Is that possible?

image
I’d like just it to be option 1.

The “prefill_” prefix has to be on every field reference, not just the first one. It should look like this (after your base form URL):

…prefill_Name%20of%20broker=Clark%20Kent&prefill_individual_being_reviewed=1

Joseph_Luk
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks so much! Works like a charm

Joseph_Steenso1
6 - Interface Innovator
6 - Interface Innovator

Another related question, not sure if its worth another whole question or if posting here is correct.

Is there a way to prefill using another field’s data if that data has spaces in it? eg in the example below if {Names} was John Doe it only shows up as John, as the Doe is after a space. I’m aware I probably don’t need the concatenate but with & and + signs in formulas and URLs it was getting confusing.

CONCATENATE(“https://airtable.com/xxxxxxxxxxx?prefill_Property=",Property,"&","prefill_Names=”,{Names})

Thank you in advance

Welcome to the community, @Joseph_Steenson1! :grinning_face_with_big_eyes:

Wrap the field name in the ENCODE_URL_COMPONENT() function. It’s probably best to do that with all data pulled from other fields, in case there are other special characters that need to be escaped.

A couple other tips:

  1. You don’t need to have the “&” as its own string item. It can be combined with the next prefill piece after it.
  2. You don’t need curly braces around “Names”.
CONCATENATE("https://airtable.com/xxxxxxxxxxx?prefill_Property=", ENCODE_URL_COMPONENT(Property), "&prefill_Names=", ENCODE_URL_COMPONENT(Names))

Also, you can combine pieces using the & operator, which is often more compact than using CONCATENATE().

"https://airtable.com/xxxxxxxxxxx?prefill_Property=" & ENCODE_URL_COMPONENT(Property) & "&prefill_Names=" & ENCODE_URL_COMPONENT(Names)