Brian Dunning's FileMaker Custom Functions

EmailName ( account )

Returns the name associated with the email (sans domain)

  Average rating: 4.0 (41 votes) Log in to vote

Dwayne Wright   Dwayne Wright - Show more from this author
Dwayne Wright
http://thepracticalba.com

Share on Facebook Share on Twitter

  Sample input:
accounting@abc.com, sales@abc.com, support@abc.com, management@abc.com
  Sample output:
accounting
sales
support
management

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This is a ruthlessly simple custom function that I made one evening to help myself out with a little example file I was working on. The example uses a script to pull emails that come from basics accounts such as accounting@dwaynewright.com, sales@dwaynewright.com, support@dwaynewright.com, management@dwaynewright.com and it@dwaynewright.com. I needed to extract the text in front of the “@” symbol to return accounting, sales, support, management and it (sans the @dwaynewright.com).

Since this example file is going to be moved into a number of files that I’m creating, I wanted to make it as portable as possible. So I went on a custom function hunt and didn’t find anything I needed. The needs are very basic. Look for the “@” symbol and get everything in front of it. The calculation is ...

Left ( address ; Position ( address ; "@" ; 1 ; 1 )-1)

Address is the name of the field that contains the the email address.

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: