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

Question

Question

Add characters to each value in a multi-value field

asked on September 13, 2021

Hello,
 

I'm having some trouble coming up with the correct sequence of activities in Workflow to get this done. I have a multi-value field that users enter data into; could be 1 value, could be 5 values. This value is always 12 digits: 001111223344, for example. What I want to do is add dashes in the same spot every time - after the 2nd digit, the 6th digit, the 8th digit, and 10th digit, so the example above becomes 00-1111-22-33-44.

What sequence of Workflow activities can I use to accomplish this for each value in the multi-value field? I've tried a few different methods and make a little progress before running into an issue that causes this to not work.

Any help is appreciated. Thanks!

0 0

Answer

SELECTED ANSWER
replied on September 13, 2021 Show version history

You would have to copy the multivalue field to a multivalue token, clear the field, then step through the multivalue token and append each formatted value back to the field.

1 0

Replies

replied on September 13, 2021

Jacob,

I would take the raw value, reformat it using regex, and save it back to the field.  Something like this;

 

1 0
replied on September 13, 2021 Show version history

Hi Cliff,

Thanks for the help - makes sense as to how to get the dash in there. I'm still not sure about how to do this for each value in the multi-value field. If there's 3 of these, for example, how would I iterate through each one and make these changes?

I'm sure I'm overthinking it but I can't seem to figure out how to pinpoint each value, update it with the dashes, and then replace the original with the new value.

0 0
SELECTED ANSWER
replied on September 13, 2021 Show version history

You would have to copy the multivalue field to a multivalue token, clear the field, then step through the multivalue token and append each formatted value back to the field.

1 0
replied on September 13, 2021

That's what I kept overlooking - clearing out the field altogether rather than trying to update each value. Thanks!

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

Sign in to reply to this post.