cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Substring Inline Function

Jump to solution

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

Labels: (2)
Reply
2 Replies
Workflow Hero

Re: Substring Inline Function

Jump to solution

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".

Reply
Workflow Hero

Re: Substring Inline Function

Jump to solution

That did the trick Tom Castiglia! Thanks.

0 Kudos
Reply