Help

Welcome to the Airtable Community! If you're new here, check out our Getting Started area to get the most out of your community experience.

Having trouble getting my formula to work (prefill form)

Topic Labels: Formulas
Solved
Jump to Solution
517 4
cancel
Showing results for 
Search instead for 
Did you mean: 

So I watched an excellent Youtube video and figured out how a user can edit table data with a form. However, I got the Record ID to prefill, but I can seem to get the others working.

Here is the code. It’s a mess. Hard to write it in since a tiny box.

CONCATENATE({Form URL},'?prefill_Parent%20Record%20ID=',{Record ID},'&prefill_Doll%20Complany=',{Doll Company},'&prefill_Company%20Logo=',{Company Logo},'&prefill_Country=',{Country},'&prefill_Status=',{Status},'&prefill_Doll%20Lines=',{Doll Lines},'&prefill_Sub%20Lines=',{Sub Lines},'&prefill_Resin%20Colors=',{Resin Colors},'&prefill_Will%20they%20custom%20color%20resin?=',{Will they custom color resin?},'&prefill_Official%20Webpage=',{Official Website},'&prefill_Official%20Taobao%20Store=',{Official Taobao Store},'&prefill_Official%20Measurements=',{Official Measurements},'&prefill_Skin%20Color%20Comparison=',{Skin Color Comparison},'&prefill_Notes=',{Notes})

Company Logo is an attachment field (this may be the issue), not sure how I can get that to prefill if at all? I tried removing it and there as no change.
Status is a single select field
“Will they custom color resin?” is a single select field
Official Website is a URL field
Official Taobao Store is a URL field
Official Measurements is a URL field
Skin Color Comparison is a URL field

The rest are all text fields.

In the video, the individual has something in his code that was “ENCODE_URL_COMPONENT”. What does that do? Do I need it?

image

UPDATE: I spelled Company wrong in my code, and fixed that so now that field prefills. The rest do not, however.

1 Solution

Accepted Solutions

Things to note: This solution of free. I have a free plan so I cannot use apps and don’t want to spend hundreds on a third-party solution.

Solutions, thanks to Youtube:

  • You cannot prefill an attachment field.
  • You need the ENCODE_URL_COMPONENT if the prefill text has spaces. Even if the prefill is a single select field, and the single selection has a space in it, then you will need ENCODE_URL_COMPONENT.

Fixing the space issue and omitting the attachment field fixed everything.

See Solution in Thread

4 Replies 4

If you have a pro account you could just use the Prefill Forms app to generate the proper code for you.

I do not have a pro account.

I managed to get a lot of them working. However, some of the prefills are getting cut off at one word. Also, how to prefill a single select field to whatever the field is set as?

Things to note: This solution of free. I have a free plan so I cannot use apps and don’t want to spend hundreds on a third-party solution.

Solutions, thanks to Youtube:

  • You cannot prefill an attachment field.
  • You need the ENCODE_URL_COMPONENT if the prefill text has spaces. Even if the prefill is a single select field, and the single selection has a space in it, then you will need ENCODE_URL_COMPONENT.

Fixing the space issue and omitting the attachment field fixed everything.