The instring function is your friend. There is probably a more elegant solution, but this is what I came up with quickly.
I tried to account for their not being any Middle Initial and a Last Name showing as for example Allen Lieberman (mine) which is not hypehnated but consists of a two word last name.
Let me know if you have issues:
stringvar name := {@sr}; //replace with your field
stringvar Lname := mid(name,1,InStr(1, name,',')-1) ;
stringvar Fname := if Instr( 1, name, '.') <> 0 then mid(name,InStr(1, name,',')+1, (InStr(name,'.')-2)) + " " else
mid(name,InStr(1, name,',')+1) + " " ;
stringvar MI := if Instr( 1, name, '.') <> 0 then mid(name,Instr( 1, name, '.')-1,2) + " " else "";
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.