Remove characters from text input
We have a workflow with an input form, in which users input a parcel ID string. Often they will be just copying and pasting in the parcel ID from another application, which includes dashes/hyphens in the string, for example:
320421-002-019-00
Currently the workflow assumes that the parcel ID will have no dashes/hyphens, like this:
32042100201900
I've tried using the Regular Expression Replace activity to remove these character, but that activity requires a “Replacement” parameter, which can't be blank. Using “” or ‘’ just results in a string like this:
320421""002""019""00
And leaving it blank is not allowed. What is the correct syntax to use here?
Thanks!
-
Hi Jesse Langdon,
Have you added an equals sign before “” or ‘’? The equals sign is necessary to initialize the input as an expression, otherwise it is treated as a string. In other words, typing “” without an equals sign is more like “”"".
1 -
One more thing - in my original reply, I glanced over the part where you said you are using a Regular Expression Replace activity. This activity uses regular expressions to perform advanced text replacement, which is probably not necessary here. The Text Replace activity may be an easier option to work with.
1 -
That worked, thanks so much!
0 -
I will tack onto this thread.
I noticed that the activity output (Regular Expression Replace) does not persist beyond the ‘scope’ it was created in? For example i used this activity in a form, but can not insert the output in an activity outside of the form. Is this a bug or did i overlook something in the documentation?
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
4 commentaires