You could use a formula field that will be the new output of the uniform output in your desired format.
The formula would look at the input field (the field with the three different formats) and format to your desired format.
You could use a formula field that will be the new output of the uniform output in your desired format.
The formula would look at the input field (the field with the three different formats) and format to your desired format.
Nice and simple!
Then use a series of string functions split and format the output, correct?
I’ll give it a try!
Nice and simple!
Then use a series of string functions split and format the output, correct?
I’ll give it a try!
I spent a couple of hours playing around with the formula filed, but it turns out it’s not so easy as it sounded.
I have entries that can look like these on my record:
https://www.instagram.com/brand
https://www.instagram.com/brand/?hl=en
@brand
brand
And I want to be left only with the ‘brand’ part. Which is the instagram handle.
The formula I came up with is:
LEFT(
SUBSTITUTE(
SUBSTITUTE(
{Instagram},
"@",
""),
"https://www.instagram.com/",
""),
(SEARCH("/",
SUBSTITUTE(
SUBSTITUTE(
{Instagram},
"@",
""),
"https://www.instagram.com/",
"")
)) -1
)
That is:
SUBSTITUTE I’m removing the @ in case it’s present.
SUBSTITUTE Removing the “https://www.instagram.com/” in an attempt to be left with only the handle.
LEFT discards anything that comes after the last “/”
The problem is, for the entries that don’t have “/” in them the formula returns nothing. Because the LEFT formula doesn’t have a starting point.
I spent a couple of hours playing around with the formula filed, but it turns out it’s not so easy as it sounded.
I have entries that can look like these on my record:
https://www.instagram.com/brand
https://www.instagram.com/brand/?hl=en
@brand
brand
And I want to be left only with the ‘brand’ part. Which is the instagram handle.
The formula I came up with is:
LEFT(
SUBSTITUTE(
SUBSTITUTE(
{Instagram},
"@",
""),
"https://www.instagram.com/",
""),
(SEARCH("/",
SUBSTITUTE(
SUBSTITUTE(
{Instagram},
"@",
""),
"https://www.instagram.com/",
"")
)) -1
)
That is:
SUBSTITUTE I’m removing the @ in case it’s present.
SUBSTITUTE Removing the “https://www.instagram.com/” in an attempt to be left with only the handle.
LEFT discards anything that comes after the last “/”
The problem is, for the entries that don’t have “/” in them the formula returns nothing. Because the LEFT formula doesn’t have a starting point.
Then I tried something more complex. Instead of using the LEFT function to start with, I tried another SUBSTITUTE to eliminate anything that comes after the last “/”.
Also no success.
SUBSTITUTE(
SUBSTITUTE(
SUBSTITUTE(
{Instagram},
"@",
""),
"https://www.instagram.com/",
""),
RIGHT(
SUBSTITUTE(
SUBSTITUTE(
{Instagram},
"@",
""),
"https://www.instagram.com/",
""),
(LEN(
SUBSTITUTE(
SUBSTITUTE(
{Instagram},
"@",
""),
"https://www.instagram.com/",
"")) -
SEARCH("/",
SUBSTITUTE(
SUBSTITUTE(
{Instagram},
"@",
""),
"https://www.instagram.com/",
"")
))
),
"")
Your first attempt was pretty close, but I think what was hijacking the process was the order you chose for removing the pieces.
I started by first removing the most difficult part—everything from “/?” to the end—using this formula:
LEFT(
Instagram, IF(
FIND("/?", Instagram),
FIND("/?", Instagram) - 1,
LEN(Instagram)
)
)
If those characters are found, the LEFT()
function is fed their starting position minus 1; otherwise it’s fed the entire string length. That gets us this far:

Wrap that in a couple of SUBSTITUTE()
functions to remove the other known items:
SUBSTITUTE(
SUBSTITUTE(
LEFT(
Instagram, IF(
FIND("/?", Instagram),
FIND("/?", Instagram) - 1,
LEN(Instagram)
)
), "https://www.instagram.com/", ""
), "@", ""
)

Your first attempt was pretty close, but I think what was hijacking the process was the order you chose for removing the pieces.
I started by first removing the most difficult part—everything from “/?” to the end—using this formula:
LEFT(
Instagram, IF(
FIND("/?", Instagram),
FIND("/?", Instagram) - 1,
LEN(Instagram)
)
)
If those characters are found, the LEFT()
function is fed their starting position minus 1; otherwise it’s fed the entire string length. That gets us this far:

Wrap that in a couple of SUBSTITUTE()
functions to remove the other known items:
SUBSTITUTE(
SUBSTITUTE(
LEFT(
Instagram, IF(
FIND("/?", Instagram),
FIND("/?", Instagram) - 1,
LEN(Instagram)
)
), "https://www.instagram.com/", ""
), "@", ""
)

Very nice. Formulas has never been my strong suit. Thanks for jumping in @Justin_Barrett.