Help

Help with substitute for multiple formulas in one column

2942 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Darien_Library
4 - Data Explorer
4 - Data Explorer

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!

2 Replies 2

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'
    )
Darien_Library
4 - Data Explorer
4 - Data Explorer

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, ')