Support 805.461.7300
Sales
Our Technology. Your Success.

Insert Space in Full name

This command will take a name in the field called First that is formatted like this:
JohnSmith
(where the first and last name are together without a space and the last name has a capital letter)

and make it: John Smith

With your name in the field called first, pull down the Edit menu to Command, then run the command below:

com_Char=65
com_Field="FIRST"
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
com_Char=com_Char+1
REPLACE &com_Field WITH LEFT(&com_Field,1)+STUFF(SUBSTR(&com_Field,2),AT(CHR(com_Char),SUBSTR(&com_Field,2)),0," ") ;
    FOR AT(CHR(com_Char),SUBSTR(&com_Field,2))>0
REPLACE ALL &com_Field with REDUCE(&com_Field)

« Back to Commands

Thank you for providing such a powerful product! I am so glad I renewed in at the 3-year level. I am amazed at what a difference the ANKlink makes on cleaning client databases.
C.S., Sequim, WA