Jump to content
Sign in to follow this  
john777

Script to keep only a single email address in a field

Recommended Posts

Hello

Am trying to clean up the email field on a filemaker database.  At the moment there are many records that contain more than one email address or an email address and text.

what I want to do is delete everything in the field apart from the first email address

In the vast majority of cases the required email address is the first thing in the field.  So my thinking is that the script would have to read along until it found an "@" symbol and then truncate the text at the next space comma or backward or forward slash as they are generally the methods people have used to separate the email addresses.

Apart from that am struggling - I would be delighted if someone could give me some pointers on this

Share this post


Link to post
Share on other sites
25 minutes ago, john777 said:

space comma or backward or forward slash as they are generally the methods people have used to separate the email addresses.

Can you provide an exact list of all possible separators - or more precisely, separator strings? A forward slash is a valid e-mail address character, so I presume you mean it was used surrounded by spaces? So this particular separator string would be:
" / "

Edited by comment

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Similar Content

    • By 360Works
      360Works at DevCon 2018: Discount Extended!
      We had a great time at the 2018 FileMaker Developer Conference in Grapevine, Texas. Nothing gets the 360Works team more excited than demonstrating our products and meeting other FileMaker Developers! We are pleased to announce that we will be extending our DevCon discount until Friday, August 17, 2018. Enter code DEVCON18 at checkout and receive 15% off of your purchase!

      Use the product table below to learn more about your favorite products and take advantage of the discount.
      At DevCon this year, Joe Martin demonstrated the brand new 360Deploy 2 for completely automating deployment of development changes to a production server and Jesse Barnum demonstrated a new version of MirrorSync, version 5, which has more convenience for end users and over 40 improvements to reliability, speed, and stability.

      At our booth, the MirrorSync Setup Station allowed many DevCon attendees to return home with a fully functional sync setup and Richard Carlton Consulting gave out free FileMaker 17 training books at our booth this year!
      Click on any of our product links below to learn more or use the discount:
      Product Name Product Description 360Deploy Automated, simple deployment of new database versions Charts Easy-to-use charting for FileMaker CloudMail Send and track email marketing campaigns Email Send and receive text and HTML emails in FileMaker DocuBin Document and digital asset management FTPeek FTP upload and download from your FileMaker database JDBC SQL access with JDBC Compatibility MirrorSync Sync FileMaker Go and Pro on a device without network connection, sync FileMaker Servers, and sync FileMaker with SQL databases Plastic Payment processing plugin RemoteScripter Trigger scripts on FileMaker Pro from the web or IWP SafetyNet FileMaker Server offsite backup Scribe Read and write PDF, Word, and Excel files ScriptMaster Adds many new functions & create custom plug-ins SuperContainer A better container field Web Assistant Access internet resources, URLs, and fill out web forms Web Services Manager Publish FileMaker scripts as XML Web Services Zulu FileMaker calendar sync Stay updated with 360Works
       
    • By Rabernethy
      Hello
      I have inherited a database in Filemaker 12 on Windows, but I am completely new to databases. I have a script which generates and saves a pdf for each person using fields from their record. This works well.
      I then have a second script which is meant to email each of these pdfs to the corresponding person. I have included screen shots of the script and the "send mail" options.
      When I tested it by putting only my own email address in the To: box, it sent me hundreds of emails each with a different name in the text, and the correct corresponding pdf attached, as expected.
      Very embarrassingly, when I tried to send the pdfs out, it sent an email to each person with the right name in the body of the text, but all with the same email attachment (for the first person in the list)! What did I do wrong?
      Thank you in advance for any advice you can offer.


    • By elipsett
      I've been using FMP13 on MacOSX 10.12.6 with Apple Mail to send FMP-generated emails with attached PDFs. 
      I recently switched from Apple Mail to Airmail, and it is now impossible to send emails from FMP.

      Does anyone know if Airmail can send mail with attachments on Sierra MacOS 10.12.6, if I upgrade to FMP16?
      That's the only reason I might really need to upgrade, and since upgrading to FMP16 will also require a few new computers to run the new OS that the new FMP demands, I'd rather not spend all that money now if I can avoid it.
       
      Thanks.
    • By Z162
      Hi,
       
      I'm using 360 works eMail Plugin with FM Pro Advanced 16 and FMS 16 with success. I try to use last version 3.05 with Filemaker Cloud, but I have an issue with the "GetNextMessage". This command doesn't work. I can see Mailboxes, number of messages and so on, but reading message is impossible.
      Someboby has a solution ?
       
      Thank's !
    • By KassK
      Hi
      I have been asked to set up something that will send out email automaticly when the date in the "review date" field is 14 days prior to the current date, can someone help me with a script that would be able to perfom this task? I have also created and email field that will hold the email address.
      thank you
      Kassy
×

Important Information

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