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

Question

Question

Can a token be a negative space?

asked on August 12, 2020

I am working on some Workflows that use employee's full names as tokens (first, middle, and last respectively) however some employees do not have a middle name but because the middle name field is required it uses N/A and herein lies my issue. 

I currently have every process that requires a middle name run side by side after a Conditional Decision that checks the "Employee's Middle Name" to see if it is "N/A" or "n/a" but if I could simply have a token replace the middle name field as a negative space I could get the employee's names to look right while using a single-sided workflow that doesn't need to split.

I know "negative space" might not be the right word but what I want is that if the middle name is N/A to replace it with a delete stroke or something so that an employee's name would appear as "John Doe" and not "John  Doe".

I hope this makes sense.

0 0

Replies

replied on August 13, 2020

Hi Timothy,

At the start of the workflow, create some tokens for the middle and last name that you use throughout the process, both with a leading space. So one token that's " [last name]" and another that's " [middle name]", and if middle is N/A, set it to blank afterwards. Then when you concatenate the tokens into the full name as first & middle & last, there will not be that extra space if the middle name is blank.

You can also just make tokens at the start of the workflow for all the concatenated versions of the full name that you will be using, like "[first] [middle] [last]" and "[last], [first] [middle]", and then just use those wherever you need them.

If you set them initially and then afterwards check if N/A and set them as a blank middle name, you can use the same tokens throughout the process without needed to re-check every time.

0 0
replied on August 13, 2020

I knew there was a simple solution, thanks!

0 0
replied on August 13, 2020 Show version history

Another way to handle this is to have the FullName token populate with the "N/A" value as the middle name and then use a conditional sequence where if FullName matches Regular Expression .*[nN]//[aA].* then set the FullName Token = %(FullName#<(.*)//s*[nN]////[aA]>#) %(FullName#<[nN]////[aA]//s*(.*)>#)

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

Sign in to reply to this post.