Url formula with spaces

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

Hi @Sebastien_Dolidon - replace:

{Company}

with

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

JB

2 Likes

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

1 Like

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.

1 Like

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