Hi @Huw_Jones ,
Welcome to Airtable Community!
I see you already have your formula
It should look something like this
"https://random.company.co.uk/crsc/api/status/?dateOfBirth="&{DOB}&"&s
urname="&{Surname}&"&hasAgreedTermsAndConditions=true&organisationName="&{Organization Name} &employeeSu
rname=&employeeForename=
Of course since I dont have the field names Im only able to assume.
The idea is you need to concatenate the data and where you need the ampersand you can do it like this &"&surname=
Hi @Huw_Jones ,
Welcome to Airtable Community!
I see you already have your formula
It should look something like this
"https://random.company.co.uk/crsc/api/status/?dateOfBirth="&{DOB}&"&s
urname="&{Surname}&"&hasAgreedTermsAndConditions=true&organisationName="&{Organization Name} &employeeSu
rname=&employeeForename=
Of course since I dont have the field names Im only able to assume.
The idea is you need to concatenate the data and where you need the ampersand you can do it like this &"&surname=
Thanks for your help Mohamed,
Unfortunately, the TermsAndConditions=true section in the formula leads to the following message: Formula functions must be immediately followed by “(”.
Do you know of a way to show airtable that this part of the url is not to be treated as a formula?
Sorry for being so think here - I have no knowledge of coding and this is really pushing the boundaries of my knowlegde.
Thanks for your help Mohamed,
Unfortunately, the TermsAndConditions=true section in the formula leads to the following message: Formula functions must be immediately followed by “(”.
Do you know of a way to show airtable that this part of the url is not to be treated as a formula?
Sorry for being so think here - I have no knowledge of coding and this is really pushing the boundaries of my knowlegde.
Hi Huw,
The formula is just an example
Basically you put anything you need between quotation marks "Text Here"
so Airtable would understand that this is a fixed text and not a field.
If you want to share a screenshot or a view of the base so I can write the formula in the way you need it I ll be happy to do it
Thanks for your help Mohamed,
Unfortunately, the TermsAndConditions=true section in the formula leads to the following message: Formula functions must be immediately followed by “(”.
Do you know of a way to show airtable that this part of the url is not to be treated as a formula?
Sorry for being so think here - I have no knowledge of coding and this is really pushing the boundaries of my knowlegde.
Welcome to the Airtable community!
Maybe this pattern will be easier for you to follow:
CONCATENATE(
"https://random.company.co.uk/crsc/api/status/",
"?dateOfBirth=" & ENCODE_URL_COMPONENT(DATESTR({dateOfBirth})),
"&surname=" & {surname},
"&hasAgreedTermsAndConditions=true",
"&organisationName=" & {organizationName},
"&employeeSurname=" & {employeeSurname},
"&employeeForename=" & {employeeForename}
)
Depending on your field types, you may need a more complex formula.
CONCATENATE(
"https://random.company.co.uk/crsc/api/status/",
"?surname=" & ENCODE_URL_COMPONENT({surname} & ""),
"&hasAgreedTermsAndConditions=" & {hasTermsAndConditions},
"&organisationName=" & ENCODE_URL_COMPONENT({organizationName} & ""),
"&employeeSurname=" & ENCODE_URL_COMPONENT({employeeSurname} & ""),
"&employeeForename=" & ENCODE_URL_COMPONENT({employeeForename} & ""),
IF(
{dateOfBirth},
"&dateOfBirth=" & ENCODE_URL_COMPONENT(DATESTR({dateOfBirth}))
)
)
Hi Huw,
The formula is just an example
Basically you put anything you need between quotation marks "Text Here"
so Airtable would understand that this is a fixed text and not a field.
If you want to share a screenshot or a view of the base so I can write the formula in the way you need it I ll be happy to do it
Thank you Mohamed once again. I’ve got this part working now. I am now having difficulty formatting the date of birth in the DD/MM/YYY format. Would you mind showing me where I’m going wrong here? I figured out it was something to do with the date string thanks to @kuovonne 's kind answers.
“https://random,company.co.uk/api/status/“&{something}&”?dateOfBirth=”(DATETIME_FORMAT(‘&{Date of Birth}’',‘L’))&“&surname=”&{Surname}&“&hasAgreedTermsAndConditions=true&organisationName=&Tidal Supply&employeeSurname=&employeeForename=Jones”
Welcome to the Airtable community!
Maybe this pattern will be easier for you to follow:
CONCATENATE(
"https://random.company.co.uk/crsc/api/status/",
"?dateOfBirth=" & ENCODE_URL_COMPONENT(DATESTR({dateOfBirth})),
"&surname=" & {surname},
"&hasAgreedTermsAndConditions=true",
"&organisationName=" & {organizationName},
"&employeeSurname=" & {employeeSurname},
"&employeeForename=" & {employeeForename}
)
Depending on your field types, you may need a more complex formula.
CONCATENATE(
"https://random.company.co.uk/crsc/api/status/",
"?surname=" & ENCODE_URL_COMPONENT({surname} & ""),
"&hasAgreedTermsAndConditions=" & {hasTermsAndConditions},
"&organisationName=" & ENCODE_URL_COMPONENT({organizationName} & ""),
"&employeeSurname=" & ENCODE_URL_COMPONENT({employeeSurname} & ""),
"&employeeForename=" & ENCODE_URL_COMPONENT({employeeForename} & ""),
IF(
{dateOfBirth},
"&dateOfBirth=" & ENCODE_URL_COMPONENT(DATESTR({dateOfBirth}))
)
)
Won’t this have the ability to resolve to null and thereby fail when concatenating a null value?
Won’t this have the ability to resolve to null and thereby fail when concatenating a null value?
Nope. I have used this pattern several times. Is it not working for you?
Thank you Mohamed once again. I’ve got this part working now. I am now having difficulty formatting the date of birth in the DD/MM/YYY format. Would you mind showing me where I’m going wrong here? I figured out it was something to do with the date string thanks to @kuovonne 's kind answers.
“https://random,company.co.uk/api/status/“&{something}&”?dateOfBirth=”(DATETIME_FORMAT(‘&{Date of Birth}’',‘L’))&“&surname=”&{Surname}&“&hasAgreedTermsAndConditions=true&organisationName=&Tidal Supply&employeeSurname=&employeeForename=Jones”
Hi @Huw_Jones ,
This is actually easy, you can use this
DATETIME_FORMATE({Date of Birth},"DD/MM/YYY")
Nope. I have used this pattern several times. Is it not working for you?
No, but I saw the pattern lacked an else argument and assumed that it would not magically concatenate an empty string. I guess it does have some magic. :winking_face:
Hi @Huw_Jones ,
This is actually easy, you can use this
DATETIME_FORMATE({Date of Birth},"DD/MM/YYY")
Thanks again, I’ve ammended the formula but it’s still giving me error messages. Any pointers as to where I’m going wrong?
“https://random.company.co.uk/api/status/“&{something}&”?dateOfBirth=”(DATETIME_FORMAT(&{Date of Birth}&, “DD/MM/YYYY”))&“&surname=”&{Surname}&“&hasAgreedTermsAndConditions=true&organisationName=&Tidal Supply&employeeSurname=&employeeForename=Jones”
Thanks again, I’ve ammended the formula but it’s still giving me error messages. Any pointers as to where I’m going wrong?
“https://random.company.co.uk/api/status/“&{something}&”?dateOfBirth=”(DATETIME_FORMAT(&{Date of Birth}&, “DD/MM/YYYY”))&“&surname=”&{Surname}&“&hasAgreedTermsAndConditions=true&organisationName=&Tidal Supply&employeeSurname=&employeeForename=Jones”
I can see the problems , the below formula should work
"https://random.company.co.uk/api/status/"&{something}&"?dateOfBirth="&DATETIME_FORMAT({Date of Birth}, "DD/MM/YYYY")&"&surname="&{Surname}&"&hasAgreedTermsAndConditions=true&organisationName=Tidal+Supply&employeeSurname=employeeForename=Jones"
I can see the problems , the below formula should work
"https://random.company.co.uk/api/status/"&{something}&"?dateOfBirth="&DATETIME_FORMAT({Date of Birth}, "DD/MM/YYYY")&"&surname="&{Surname}&"&hasAgreedTermsAndConditions=true&organisationName=Tidal+Supply&employeeSurname=employeeForename=Jones"
Amazing! Thank you so much Mohamed!
Huw