bkurzbuch Posted June 13, 2018 Posted June 13, 2018 I have a project where a "Partner Code" is used in 3 places. Two are in body copy and 1 in a URL. Using the "Case selection for a name field Rule" i can get them to print as all caps or lower case where I need them to be. My questions is how do I trim out all spaces. I found how to remove leading and trailing spaces, but I need to remove all spaces incase the end user in Marcom enters it with a space somewhere. Thank You. Quote
GreggRusson Posted June 13, 2018 Posted June 13, 2018 http://forums.pti.com/showthread.php?p=20745#poststop Quote
bkurzbuch Posted June 13, 2018 Author Posted June 13, 2018 Hi Greg Thanks for the reply. I tried both of the options in the link you provided, but I can't get it to remove a space in the middle of the variable. I need the variable to look like "ABC123" but I'm getting "ABC 123". Thanks Quote
step Posted June 15, 2018 Posted June 15, 2018 I bet you're variable is actually returning a non-breaking space character ( ) rather than an actual space. Try this: return RawTextFromTagged(Field("Partner Code")).replace(/\s/g, ''); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.