Skip to main content

Url formula with spaces

  • May 4, 2019
  • 9 replies
  • 89 views

Hi Airtable community
I’m a new user and i have a problem with a formula that’s probably simple for everybody here.

I need to make an url with this formula for my typeform : CONCATENATE(‘https://mytypeform.typeform.com/to/gMQE2K?company=’, {Company}, ‘&person=’,{Person} ,’&id=’,{ID})

But there is often spaces in the names of the companies, which is breaking my URLs

I found the formula to substitute the spaces :
SUBSTITUTE(fieldName, " ", “%20”)

But i can’t figure out where to place it in the final formula.

Thanks a lot if you can help !
Sébastien

9 replies

JonathanBowen
Forum|alt.badge.img+18
  • Inspiring
  • 1110 replies
  • May 4, 2019

Hi @Sebastien_Dolidon - replace:

{Company}

with

SUBSTITUTE({Company}, " ", “%20”)

JB


  • Author
  • New Participant
  • 2 replies
  • May 4, 2019

Hi @Sebastien_Dolidon - replace:

{Company}

with

SUBSTITUTE({Company}, " ", “%20”)

JB


Thanks a lot for you answer JB, but where should i put it in the other formula :
CONCATENATE(‘https://mytypeform.typeform.com/to/gMQE2K?company=’, {Company}, ‘&person=’,{Person} ,’&id=’,{ID})

Just after it ? inside it ?


JonathanBowen
Forum|alt.badge.img+18
  • Inspiring
  • 1110 replies
  • May 4, 2019

Thanks a lot for you answer JB, but where should i put it in the other formula :
CONCATENATE(‘https://mytypeform.typeform.com/to/gMQE2K?company=’, {Company}, ‘&person=’,{Person} ,’&id=’,{ID})

Just after it ? inside it ?


Sorry, should have been clearer. Try this:

CONCATENATE('https://mytypeform.typeform.com/to/gMQE2K?company=', SUBSTITUTE({Company}, ' ', '%20'), '&person=',{Person} ,'&id=',{ID})

JB


JonathanBowen
Forum|alt.badge.img+18
  • Inspiring
  • 1110 replies
  • May 4, 2019

Sorry, should have been clearer. Try this:

CONCATENATE('https://mytypeform.typeform.com/to/gMQE2K?company=', SUBSTITUTE({Company}, ' ', '%20'), '&person=',{Person} ,'&id=',{ID})

JB


It’s a formula within a formula, which is pretty common, of course. You could also create the “new” company name as its own field, use this new field in the formula, then hide the modified company name field. I sometimes do this to reduce the formula complexity.


  • Author
  • New Participant
  • 2 replies
  • May 4, 2019

Thanks a lot JB, it’s working perfectly ! love u ! have a great week end :grinning_face_with_smiling_eyes:


Forum|alt.badge.img+2
  • Known Participant
  • 13 replies
  • May 12, 2021

I am trying to do a similar thing but I have an extra field. Please help me correct the formula…

CONCATENATE(‘https://form.jotform.com/’, &{formID}, &’?companyName=’, SUBSTITUTE({Company Name}, ’ ‘, ‘%20’), &’&imageLink=’, &{Logo URL})


Forum|alt.badge.img+2
  • Known Participant
  • 13 replies
  • May 12, 2021

I am trying to do a similar thing but I have an extra field. Please help me correct the formula…

CONCATENATE(‘https://form.jotform.com/’, &{formID}, &’?companyName=’, SUBSTITUTE({Company Name}, ’ ‘, ‘%20’), &’&imageLink=’, &{Logo URL})


Figured it out:

CONCATENATE(‘https://form.jotform.com/’ &{formID} &’?companyName=’,
SUBSTITUTE({Company}, ’ ', ‘%20’), ‘&imageLink=’,{Logo URL})


Forum|alt.badge.img+14
  • Inspiring
  • 93 replies
  • March 23, 2022

Figured it out:

CONCATENATE(‘https://form.jotform.com/’ &{formID} &’?companyName=’,
SUBSTITUTE({Company}, ’ ', ‘%20’), ‘&imageLink=’,{Logo URL})


Trying to do something similar except that for the pre-filled form, it is not copying all of the substituted text. Why might this be?


Forum|alt.badge.img+21
  • Inspiring
  • 174 replies
  • March 5, 2023

Trying to do something similar except that for the pre-filled form, it is not copying all of the substituted text. Why might this be?


Maybe this may help 
Prefilled Forms extension for Airtable by @kuovonne