October 6, 201510 yr What I want to do is have a calc field look at a text field and extract the account name that's left of the "@" sign in its e-mail address. Since the right side of the "@" sign is the same server address 99.9% of the time, at first I thought of using the Filter command just to filter the "@lcsc.edu" part of the address but sure enough, that .1% will appear so that command won't work. I also thought of using LeftWords ( Email Address ; 1 ), but that falls flat with hyphenated names. I found this link (http://help.filemaker.com/app/answers/detail/a_id/6481/~/example-of-how-to-extract-data-following-a-special-character-in-a-field) that comes close, but it's through a script and the "wrong" side of the address. I'd rather use a calculation, but if I'm forced to use the script then how do I extract what's left of the "@" and not what's right of it? TIA for your help! Rich Edited October 6, 201510 yr by WF7A
October 6, 201510 yr extract the account name that's left of the "@" sign in its e-mail address. Isn't it obvious? Left ( EmailAddress ; Position ( EmailAddress ; "@" ; 1 ; 1 ) - 1 ) Or, if you prefer: GetValue ( Substitute ( EmailAddress ; "@" ; ¶ ) ; 1 ) Edited October 6, 201510 yr by comment
October 6, 201510 yr Author If it were obvious... Nah, forget it--I still don't see things that are obvious to others but not to me. :S So, educate me, please: what does the "-1" do at the right side of the equation? I've seen it in other equations--does it equate to "before"? Edited October 6, 201510 yr by WF7A
October 6, 201510 yr No - the Position bit is to find where the @ symbol is, and you want one less character than that so that the @ symbol isn't included in the final result.. Edited October 6, 201510 yr by webko
October 7, 201510 yr So, educate me, please: what does the "-1" do at the right side of the equation? The way to learn what it does is to remove it (or change it to +1 or -2, etc.) and see what has changed. That and reading the help on Left() and Position() , of course.
Create an account or sign in to comment