Skip to main content

Hi Folks,

I want to use a workflow inline function to get a substring from a URL. The URL will be generated by {Common:WebUrl}

I want to go from, for example, "https://platform.domain.com/sites/SiteCollection/site" to "SiteCollection/site"

My difficulty is that I do not know where the site collection part of the string will occur or how many sub-site levels there will be. Is there an easy way to do this that is escaping me?

Thanks in advance!

Patrick Kelligan

Patrick -

How about this with a Set Variable action:

fn-Replace(Web URL,"https://platform.domain.com/sites/","")

If {Common:WenUrl} = "https://platform.domain.com/sites/SiteCollection/site" then this function will return "SiteCollection/site".


That did the trick Tom Castiglia! Thanks.


Reply