My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
Go to Article
Advanced Search 

ADVISOR ANSWERS

Clean Up E-Mail Addresses in FileMaker Pro

Here's how to get started de-duping.

By Chris Moyer, The Moyer Group CEO and FileMaker Advisor technical editor, and Bob Bowers, Soliant Consulting CEO and FileMaker Advisor technical editor


Q: I want to clean up e-mail addresses I've imported into various FileMaker Pro files. The scripts I've written search for matching e-mail addresses and some organizations have different names attached to the same address. For instance, if I search for the address info@wowserrecords.com, there are several people at Wowser Records so I have an array of addresses such as:

Jenny <info@wowserrecords.com>
Admin <info@wowserrecords.com>
Garry <info@wowserrecords.com>

I want to perform a simple substitution that looks for and replaces all e-mail records to just what's between the "<" and ">". I know this is trivial, but I've goofed it up so far. Many thanks for your help.

-- Dave Mac

A: To parse just the e-mail address out of these values, you have to find the position of the two "delimiters" and use the Middle function to return everything between them. If you're using FileMaker Pro 7 or newer, use the Let function to make the syntax simple and clear:

Let ([
   Start = Position (Email ; "<" ; 1; 1) ;
   End = Position (Email ; ">" ; 1; 1)
    ];
   Middle ( Email ; Start + 1 ; End – Start - 1 )
)

For example, say the e-mail field contained "fred <fred@xyz.com>". In this case, Start would equal 6 (the position of the first "<"), and End would equal 19 (the position of the first ">"). So starting at the character after the "<", take a slice equal to the number of characters between the delimiters: Middle (Email ; 7 ; 12) returns "fred@xyz.com".

If your records don't always contain the greater than and less than format, you'll want to put in a conditional test or other logic to handle those records correctly. And before you run a big replace operation on your data, we'd recommend perfecting your function in a calc field so you can tweak it if necessary.

Clean Up E-Mail Addresses

No reader comments ... yet.

    What do YOU think about this topic? Share your advice and thoughts using this form.

    Your Name

    REQUIRED : PUBLIC

    Your E-Mail

    REQUIRED : PRIVATE

    Job, Company

    OPTIONAL : PUBLIC

    City, State, Country

    OPTIONAL : PUBLIC

    Your Web Site

    OPTIONAL : PUBLIC

    Your Comment

    Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


    Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

    Chris MoyerChris Moyer is president and CEO of The Moyer Group, a FileMaker Pro consulting and training firm with offices in Atlanta, Chicago, and San Francisco. Chris is a technical editor of FileMaker Advisor Magazine.

    Robert BowersBob Bowers is CEO of Soliant Consulting, and co-author of three books on FileMaker Pro, including Special Edition Using FileMaker Pro 7. Bob is one of a handful of trainers authorized to teach the FileMaker Professional Foundation Training Series. Bob has been a speaker at several FileMaker Developer Conferences, and was awarded the FileMaker Fellowship Award in 2002.

    Printer-friendly
    page layout

    Keyword Tags: FileMaker, FileMaker Development, FileMaker FileMaker Pro

    ADVISORAMA
    People with clenched fists cannot shake hands.

    ARTICLE INFO

    FileMaker Advisor

    Web Edition: 2008 Week 29, Doc #19496

    Print Edition: August/September 2008, Page 5

    FREE ACCESS FREE ACCESS

    SUBSCRIPTION STATUS
    You are not signed-in. If you are a subscriber to this publication, sign-in above to access locked articles. To subscribe or renew go to www.AdvisorStore.com.

    Subscribe to DATABASED.ADVISOR.com

    Get it all -- every current and past ADVISOR tech/business publication, now all-in-one subscription, with new articles and a huge reference library packed with expert advice, how-to and downloads. Subscribe now to get it all.

    DataBased.Advisor.com

    Subscribe to FileMaker Advisor Magazine

    Read the advanced guide to creating custom business database solutions with FileMaker software. Subscribe now to gain access to all the archives and downloads.

    FileMaker.Advisor.com

    Subscribe to Advisor Basics of FileMaker Pro

    Learn the fundamentals of using FileMaker Pro software. Every issue gives you step-by-step instructions on creating the databases you need. Subscribe now!

    FileMaker.AdvisorBasics.com

    Showcase Your Smarts

    Submit your tips, techniques and advice and let Advisor promote your business and build your career. Show the world what you know!

    AdvisorTips.com

    Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
    Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
    Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
    ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
    Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
    Hosted by Prominic.NET Website powered by
    LOTUS SOFTWARE
    moyec076-02 posted 07/14/2008 modified 01/05/2009 03:44:22 AM ztfmfd/ztfmfd
    domino-144.advisor.com my.advisor.com 01/09/2009 02:53:42 PM