2

I have string link /sites/fahad/Auto/Level 1/Level 1.1 and I want to split or extract it by last slash every time.

Link in first split I want value like Level 1.1 and in second split Level 1, How can I achieve this?

3
  • do you need to split it in javascript code? Mar 28, 2017 at 7:30
  • @AlokKumarGupta, Can you write JavaScript in Designer workflow? Mar 28, 2017 at 7:33
  • Sorry, I missed the "Designer Part" earlier. I have added my take on solution below. Mar 28, 2017 at 7:38

1 Answer 1

0

We may use "Find Substring in String" and "Extract Substring from Index of String" actions in designer workflow in a loop for this. e.g.

  1. declare variable current url string, last substring, current substring
  2. find index of "/"
  3. store current value substring to last substring
  4. extract substring and store it in current substring
  5. extract remaining string in current url string

Loop through till current url string is empty. At the end current substring will have final substring and last substring will have last to second substring.

2
  • not helping out Mar 29, 2017 at 4:44
  • what is the difference between expected and received values or flow Mar 29, 2017 at 10:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.