Help

Finding and returning a number from a URL link

Topic Labels: Formulas
Solved
Jump to Solution
1351 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Cristian_Rojas
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi! I’m trying to create a formula where my Primary Field is a number that I need to pull from a URL link:
Captura de pantalla 2019-09-08 a la(s) 18.59.21.png

Currently, I am using the formula RIGHT() to tell the formula to find the last three characters from the right of the URL link, which won’t work once we get to 4 digits, or if for some reason the URL structure changes adding an extra character at the end.

Captura de pantalla 2019-09-08 a la(s) 18.59.34.png

Is there a way to find only a number from a URL and return it as such?

Thank you.

1 Solution

Accepted Solutions
Bill_French
17 - Neptune
17 - Neptune

Not really. Unfortunately, Airtable offers neither a Split() function nor regular expressions.

Does this seem to be what you’re looking for?

image

If so, the formula to handle 8 digits of precision is:

RIGHT({URL}, 8 - SEARCH("/", RIGHT({URL}, 8)))

If you anticipate new URL formats that would add a slash and second parameter on the end, it is possible to add another search to determine where the added slash is positioned.

See Solution in Thread

2 Replies 2
Bill_French
17 - Neptune
17 - Neptune

Not really. Unfortunately, Airtable offers neither a Split() function nor regular expressions.

Does this seem to be what you’re looking for?

image

If so, the formula to handle 8 digits of precision is:

RIGHT({URL}, 8 - SEARCH("/", RIGHT({URL}, 8)))

If you anticipate new URL formats that would add a slash and second parameter on the end, it is possible to add another search to determine where the added slash is positioned.

Cristian_Rojas
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you so much @Bill.French ! This will work perfectly :slightly_smiling_face: