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

Question

Question

How can I concatenate text and a token in the Assign Token Values activity?

asked on February 18, 2014

I am trying to add text to a token to account for not finding an entry.  When I run the workflow, the Assign Token Values activity seems to be stripping the text from the New Value.  So, from the picture, I end up with only the token. Is there a way to concatenate a string to the token value and set that as the new token value?

 

Assign Token Values.JPG
0 0

Answer

SELECTED ANSWER
replied on February 18, 2014

I can't reproduce this behavior with a simple workflow (Find User + Assign Token Values) in the latest version of Workflow. And I'm not seeing any bug reports of similar behavior in our bug database. What version of Workflow are you using?

1 0

Replies

replied on February 18, 2014 Show version history

To concatenate text in a token just use the static text with the token following it;

 

 

The resulting 'Display Name' token will have the value of 'NOT FOUND: ' followed by the Entry ID of the starting entry.

2 0
replied on February 18, 2014

You could make this a multiple value token instead of a single value and use the "Append to existing values" option when configuring the token.

 

Initialize the token with your static text, "Social Worker: " throw logic to append the token with either NOT FOUND, or nothing, and then append the social worker token you caught earlier in forms.

 

This solution references what I'm referring to. Just think of your single line as a multi-value token.

http://www.laserfiche.com/SolutionExchange/Article/12484

1 0
replied on February 18, 2014

Or you could always send your email with an additional token that is initialized null but only set if the Social Worker is not found. 

0 0
replied on February 18, 2014

Cliff, that is what I tried.  It does not work.  The new value strips the text that is not a token, and I am left with only the token.

0 0
replied on February 18, 2014

Is the Display Name token something other than a string? Is the token created by an "Assign Token Values" activity? if not, what is it created by?

0 0
replied on February 18, 2014 Show version history

Interesting, that example works on my 9.0 system.  What version of workflow are you running?  (Chris - Just to test your theory about the type of the original token; I set my 'Display Name' token to a couple of different types and values and still got the complete concatenated text after the above workflow activity.)

1 0
replied on February 18, 2014

I am using 9.0.  I have tried various tokens, including tokens created by the Retrieve Laserfiche Forms Content, Assign Token Values, and others created in the workflow.  

 

I have also tried putting two tokens into the new value box, and it still strips out one token.  

0 0
replied on February 18, 2014

I'm an idiot - it was user error.  I was using a different token in my output.  The functionality works just fine. Sorry!

0 0
replied on February 18, 2014

Been there, done that!  wink  Glad you figured it out!

0 0
replied on February 18, 2014

No worries. I like user errors, they're easier to fix than bugs.laugh

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

Sign in to reply to this post.