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

Question

Question

workflow token calculator substitute hyphen/em dash

asked on February 5, 2020

We have several processes where workflow updates records in an Informix database. The driver we use does not accept non-standard ascii characters (anything 126 or above) but our end users are able to enter those characters on Forms. We've created a "token scrubber" loop that searches for the most common non-standard characters and substitutes with common one's. This works great except now we've had a user submit an em dash character in the text (ascii code 226 128 147). When I try to add it to the token calculator substitute I can paste it in and it looks like and tests like the correct one. But as soon as I save the activity it is automatically converted to the standard hyphen/dash (ascii 045). See attached screenshots of before and after.

 

Am I doing this wrong, is there a bug, or another way to do this?

before save.png
after save.png
before save.png (13.24 KB)
after save.png (13.89 KB)
0 0

Replies

replied on February 6, 2020

Hi Cassandra, In that case, once the form is submitted, In your workflow, I would use a Pattern Match with a Regex to pull all of the allowed characters from the field into a new Token.

If your Pattern, put the allowable characters. example below [a-zA-Z0-9]*, and set the Matches to "Combine with no spaces"  In this example, from the string it will pull all characters, lowercase a to z, all uppercase characters Ato Z, and all digits 0 to 9. the * will capture all characters in the field. You can add special characters if you want to keep them by adding them in the pattern

Hope this helps

2 0
replied on February 5, 2020

Hi Cassandra

It is possible to constrain the input in the Forms fields by configuring a regex in Regex Validation so the user cannot add those unwanted characters. Would help you limit the possibilities and the requirements of your Token Calculator

 

0 0
replied on February 5, 2020

I'd agree with Steve.  It would be much more efficient to limit those characters on entry than to have multiple substitution tokens or loops to replace items.

0 0
replied on February 6, 2020

Some of our users that fill out the forms using mobile devices. We can't restrict characters as they may not know how to switch the type on their devices if they receive an error that they can't use the type of comma their keyboard is set to.

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

Sign in to reply to this post.