Hi,
I am attempting to truncate a set of email addresses of varying length with the goal of returning only the string of characters left of the '@' character.
Examples of desired output:
xxxx@gmail.com = xxxx
stevejobs@gmail.com = stevejobs
I have code below which I would have thought would have worked, but for some reason the following part of the code (
(FindString(TRIM([EMAIL_ADRS_X]),'@')-1)
) seems to applies the first emails @ position to every new email record. Am I nesting my formula correctly? I feel that I have overlooked something fundamental here.
IF Contains([EMAIL_ADRS_X],'@')
THEN
LEFT(TRIM([EMAIL_ADRS_X]),
(Length(TRIM([EMAIL_ADRS_X]))-(FindString(TRIM([EMAIL_ADRS_X]),'@')-1))
)
ELSE
'xxxxx'
ENDIF