Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Extract account name in front of the "@" sign in an e-mail addy


This topic is 3252 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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 by WF7A
Link to comment
Share on other sites

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 by comment
Link to comment
Share on other sites

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 by WF7A
Link to comment
Share on other sites

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 by webko
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 3252 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.