Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parse Name to Separate Parts
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01219298
Message ID:
01219339
Views:
16
Naomi

Thanks for the pointers, that idea really works in my situation except for the IV after the name. I guess I need to figure that part out. I'm going to be keeping that IV as part of the lastname.
PARAMETERS tcName
IF PCOUNT()=0
	lcRefDocName=[CUNNINGHAM LYNNE,]
ELSE
	lcRefDocName=tcName
ENDIF 
LOCAL lcReturn,lcLast,lcFirst,mi,lnLen

lcRefDocName=ALLTRIM(lcRefDocName)
* Replace any comma with []
lcNewName=STRTRAN(lcRefDocName,',',[])
lnWordCnt=GETWORDCOUNT(lcNewName)
lcLastName=GETWORDNUM(lcNewName,1)
lcFirstName=GETWORDNUM(lcNewName,2)
lcMI=GETWORDNUM(lcNewName,3)

lcReturn=[|]+lcLastName+[|]+lcFirstName+[|]+lcMI+[|]

RETURN lcReturn
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform