>
Substr(Owner1, At("=", Owner1)+1, At("=", Owner1+"=",2)-At("=", Owner1)-1) + ;
> Left( Owner1, At("=", Owner1) -1) + ;
> Substr(Owner1, At("=", Owner1+"=",2)+1)
>
This one didn't work. Owner1 field is 25 char long. For companies I don't want to do any transformation. For names I want to sort by Last Name+1 space + First Name. I want to remove suffix completely...
>>Hi everybody,
>>
>>We store names in this format FirstName Initial(1)=LastName=Suffix (Char 25), e.g.
>>James H=Smith=3rd
>>Nelson W=Smith, etc.
>>
>>Here is a current index expression:
>>index on ;
>>UPPER(PADR(TRIM(SUBSTR(OWNER1,AT("=",OWNER1)+1))+ ;
>>IIF(AT("=",OWNER1)>0,LEFT(OWNER1,AT("=",OWNER1)-1),""),25)) ;
>>tag name1
>>
>>However, this index expression doesn't correctly work with names with suffix.
>>
>>I have separate UDF functions like GetLName, GetFName, however, I don't think it's a good idea to use UDFs in Index expression. So, could you please help me with modifying the current one to properly work with suffixes. Also here is another potential problem, if index expression becomes longer than 255 chars...
If it's not broken, fix it until it is.
My Blog