Any idea how to do this? In our database, our name table has a name field, ex. "Smith,John". The data entry people are supposed to enter in that format - lastname followed by comma followed by firstname. I'm trying to pull out surname out of that field. So we use the following formula
if {PS_Y_DONOR.SUBTYPE}='I' then
Left ({PS_Y_NAME_TBL.CUSTOMERNAME}, InStr ({PS_Y_NAME_TBL.CUSTOMERNAME},","-1)
else if {PS_Y_DONOR.SUBTYPE}='O' then
{PS_Y_NAME_TBL.CUSTOMERNAME}
The letter I represents individual and the letter O represents Organization. The problem we run into is that what if the records person failed to enter a comma? It's failing if there is no comma in there so I'm not sure how to rewrite the formula. Also we are using version 7
if {PS_Y_DONOR.SUBTYPE}='I' then
Left ({PS_Y_NAME_TBL.CUSTOMERNAME}, InStr ({PS_Y_NAME_TBL.CUSTOMERNAME},","-1)
else if {PS_Y_DONOR.SUBTYPE}='O' then
{PS_Y_NAME_TBL.CUSTOMERNAME}
The letter I represents individual and the letter O represents Organization. The problem we run into is that what if the records person failed to enter a comma? It's failing if there is no comma in there so I'm not sure how to rewrite the formula. Also we are using version 7