You are viewing limited content. For full access, please sign in.

Question

Question

Split value in Workflow

asked on September 13, 2017

Good afternoon,

I'm trying to find a way to split a value from a token into individual values in order to create a folder structure.

Let's say that I have a value of "folder1/folder2/folder3/folder4".

What I'm looking for is to split the value by the "/" so that I can create a folder4 inside folder3, folder3 inside folder2 and folder2 inside folder1.

 

Another option that I thought could work was to use some type of regex to replace the forward slash with the back slash and then just use it as path directly in a "Create Entry" Activity. I haven't found a way to do this yet either.

Any ideas?

 

Thank you,

Raul Gonzalez

0 0

Answer

SELECTED ANSWER
replied on September 13, 2017 Show version history

When you assign a value to a token, you can right-click to access the Token Editor, or you can get to it through the Token Dialog.

One of the Function options is Split and you would set "Split on" to the "/" character, then you use the Index setting "All values separated by" and put the "\" character.

You'll end up with something like %(Token1#@Split(//)@##[\]#)

Which turns A/B/C into A\B\C

3 0
replied on September 13, 2017

Holly Posole Jason! That worked like a charm without modifications!!!

Good way to end the day.

Thanks Jason!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.