Help

Re: Airtable form: Pre-fill two values from a linked field

Solved
Jump to Solution
2225 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Nik_von_Pueckle
6 - Interface Innovator
6 - Interface Innovator

Hi,

I am trying to pre-fill two records in an Airtable form from the following column "Client Commercial Controls":

Nik_von_Pueckle_0-1679272970174.png

If I pull up the pre-filled form, currently I can only pre-fill the one value ("Police check to be performed"), but I also want to pre-fill the second value ("Data security policy to be added").

Nik_von_Pueckle_1-1679273109485.png

This is the formula I am using to pre-fill the form and have no issues when only pulling in one value, but can't work out how to pull in multiple values. 

Nik_von_Pueckle_2-1679273165464.png

Please advise.

Many thanks,

Nik

1 Solution

Accepted Solutions

Looks like the records you're linking to have commas in the primary field, causing the formula field to wrap them with quotes.  You could try getting rid of the quotes with a substitute, but if I were you I'd just use the record IDs instead.


To do that, add a formula field in your "Client Commercial Controls" table with the formula "record_id()", and then in your original table add a rollup field on the "Client Commercial Controls" field to grab all the record IDs of the linked records, then use that in your formula

Here's an example

 

See Solution in Thread

5 Replies 5
TheTimeSavingCo
18 - Pluto
18 - Pluto

It's probably because of an extra space.  Try replacing:

 

{Client Commercial Controls}

 

With:

 

SUBSTITUTE(
  {Client Commercial Controls},
  ", ",
  ","
)

 

If you want forms with more features and easier prefill options, you might look at our On2Air Forms app for Airtable. We have a Free version and upgraded versions - https://on2air.com/forms

______________________________________
Hannah - On2Air.com - Automated Backups for Airtable

Hi Adam @TheTimeSavingCo ,

No luck yet unfortunately. I created a new column with your formula above:

Nik_von_Pueckle_0-1679450984709.png

Nik_von_Pueckle_1-1679451000952.png

But when I update the pre-filled form formula, only the first linked value appears rather than both. 

Nik_von_Pueckle_2-1679451047557.png

Any ideas?

Thanks,

Nik

Looks like the records you're linking to have commas in the primary field, causing the formula field to wrap them with quotes.  You could try getting rid of the quotes with a substitute, but if I were you I'd just use the record IDs instead.


To do that, add a formula field in your "Client Commercial Controls" table with the formula "record_id()", and then in your original table add a rollup field on the "Client Commercial Controls" field to grab all the record IDs of the linked records, then use that in your formula

Here's an example

 

Thanks Adam @TheTimeSavingCo that's worked a treat!