I know this question must come up often, but I can't seem to locate the answer. I'm working in CRD v.7.0, and bringing in a field that has first name/middle initial/last name and want to format it last name first. I get this done by the following formula (called @UpperOriginator):
Uppercase(Trim({P.Originator}
[Instr({P.Originator}," "+1 to 25])+", " +
Trim({P.Originator}
[1 to Instr({P.Originator}," "-1]))
where P.Originator is the field.
This works fine except for some names which have middle initials (less than 25%). Then they are showing up as:
Z. Doe, John
I wrote the following additional formula:
if "*. " in ({@UpperOriginator}) then
mid({@UpperOriginator},4)
else {@UpperOriginator}
but this doesn't seem to work. Any ideas, gang? Thanks!
Uppercase(Trim({P.Originator}
[Instr({P.Originator}," "+1 to 25])+", " +
Trim({P.Originator}
[1 to Instr({P.Originator}," "-1]))
where P.Originator is the field.
This works fine except for some names which have middle initials (less than 25%). Then they are showing up as:
Z. Doe, John
I wrote the following additional formula:
if "*. " in ({@UpperOriginator}) then
mid({@UpperOriginator},4)
else {@UpperOriginator}
but this doesn't seem to work. Any ideas, gang? Thanks!