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) |