Feb 27, 2018 12:21 PM
I found an older post which asked about “stacking multiple formulas” in one column. I’d like to do that too!
My record is being brought in as a URL for a photo. I’m trying to substitute the long URL with the human-friendly text based upon what the URL was. For e.g. https://longurlhere.com/little_red.jpg should be returned as “Little Red Riding Hood.”
In some fields, there are multiple URLs, so I’d want the output to be something like Little Red Riding Hood, Three Little Pigs, Cinderella.
So far all I get is “Little Red Riding Hood” for every URL, no matter what the actual URL for that record is. Below is the code I tried.
SUBSTITUTE(SUBSTITUTE(“URLHERE/little_red.jpg”, “URLHERE/little_red.jpg”, “Little Red Riding Hood”), “URLHERE/three_pigs.jpg”, “Three Little Pigs”)
Note: I don’t have the full URL pasted in that formula since new users aren’t allowed to do so!
Feb 27, 2018 01:21 PM
There is a problem with that formula — but it may just be an artifact of your posting it to the forum.
Assuming the original URL is contained in the field {LongURL}
, the formula should be
SUBSTITUTE(
SUBSTITUTE(
{LongURL},
'URLHERE/little_red.jpg',
'Little Red Riding Hood'
),
'URLHERE/three_pigs.jpg',
'Three Little Pigs'
)
Feb 27, 2018 05:23 PM
Thank you! That helped me figure it out. The code I used:
SUBSTITUTE(SUBSTITUTE(SUBSTITUTE({Name of Column – leave in brackets},‘LONGURL/little_red.jpg’,'Little Red Riding Hood, '),‘LONGURL/three_little_pigs.jpg’,'Three Little Pigs, '),‘LONGURL/cinderella.jpg’,'Cinderella, ')