Remove extra spaces with Attribute Assistant

540
3
02-05-2018 02:30 PM
Labels (1)
JoeBorgione
MVP Emeritus

Lets say a guy has an attribute value that gets entered like this: myfield = "TOO  MANY SPACES" where there are two spaces between TOO & MANY. 

Using the attribute assistant, how would that guy drop the double space and replace it with just one?

That should just about do it....
0 Kudos
3 Replies
JoeBorgione
MVP Emeritus

moments later it came to me.  In the dynamic values table, enter a new record accordingly for Table Name, Field Name, Value Method will equal EXPRESSION and Value Info will use the replace function like this:

(Replace[myfield],"  "," "))

If you want to look for additional spaces like three or four, just add a line for each and change the Replace() to reflect the number of spaces

That should just about do it....
0 Kudos
DanPatterson_Retired
MVP Emeritus

does attribute assistant use python? (don't have it)  If so check the other thread that you were working on

0 Kudos
JoeBorgione
MVP Emeritus

No or I would'n have hit the VBs wall...  It's working now; extra spaces were giving me heartburn.

That should just about do it....
0 Kudos