Sign in to follow this  
Followers 0
john777

Script to keep only a single email address in a field

2 posts in this topic

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  
Followers 0

  • Similar Content

    • By LelandLong
      I read that the new 3.01 version does not require Java.
      When I run FMPAv16 on my Mac (10.11.6) and use the sample Email database it works just fine and I see nothing related to Java. I had the older v2.12 plugin installed on here and have just updated to v3.01 today.
      When I run FMPAv16 on a different Mac (10.11.6) and install the v3.01 plugin (never had the plugin installed on this machine before today) and run the sample database a Java App runs without any windows, Just visible in the lower right dock and its single menu is titled "Java"
      Any ideas as to this oddity?
       
      Leland Long
    • By DreadDamsel
      Hi,
      I've spent a lot of time searching around to try to figure this out - to no avail.
      I want to be able to send a single email (may be different each time the mailout is done) to multiple recipients that are the result of a find.
      I've created the script and it works fine EXCEPT I get a separate email window pops up for every recipient, into which I then have to complete the Subject and contents - not what I was hoping for. Even to do it as a an email to a single address (our organisation) and all others gathered as BCC opens up separate windows for each found record.
      Can someone please help me resolve this? If I can solve it for this list, then I can apply the same principle to the other 4 "finds" I need to be able to do.
      Using FMP12 Advanced on Mac (so using Mail), though the final product will be on Windows.
    • By Darren Burgess
      Is it possible to get as a return value the HTML code derived from the EmailSetBodyFile function? for example, given the following code, I would like to get the resulting html back. I guess I could extract the html from the file and do the substitutions in using filemaker script steps, however i am wondering if it is possible to do with plugin functions.
      EmailSetBodyFile( $_body_html_file ; 1 ) and
      EmailBodySubstitute( $_preamble_replace_string ; $_body_html ) 
      EmailBodySubstitute( $_signature_replace_string ; $_signature_html )
       
    • By 123
      Hey,
      I have a Tab-Separated Text File which I want to import to a database that I just created in FileMaker Pro 15. The text file essentially is a log of events, for instance, one line describes an order, another line describes a payment that has been made. The problem is that I somehow need to import all these lines into different tables. I want all lines in the log file that describe a payment in a table called Payments, and all lines that describe an order in a table called Orders for example.
      I'm just starting out with FileMaker so forgive me if there is an obvious solution that I'm not aware of. I have a background in software development, so the only solution that I can think of is writing a small program myself that does all the parsing for me and creates separate text files that contain all the orders and payments and other events that have been logged in the file. Then I could simply import each file into the table I need all the data in. 
      So to sum everything up, my main question is if there is a way to somehow parse the text file before importing it. I know that you can create custom scripts in FileMaker but I'm not sure if what I need to do can be done just with that.
      Thanks in advance,
      Mike
    • By menno
      When updating any 360works-plug-in it is deactivated after any update. Sometimes it does not even is replaced.
      I have created batch-scripts to shut off FileMaker and then remove any 360works-plug-in.
      After that my user(s) have to restart the application again and the new version of (any) 360works plug-in is installed correctly and activated automatically.
      I also use other plug-ins by Troi, Dacons en Goya simultaniously and these work perfectly fine and also will be updated and activated when a newer version is being installed. Only the 360works-plug-ins fail to update everytime.
      I use the script-step "Install plug-in file" so nothing exotic is done there.
      The problems occur on windows 7, 8, 8.1, 10, 2008 and 2012. On the 32 and 64 bits versions (2012 - 64-bit only)
      Any suggestions or anyone else has the same trouble?