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 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?
    • By Oyseka
      Hi all, I know this should be easy but I am not getting it right.

      The mail gets sent but no attachment
    • By MiSc
      I am receiving the following error when attempting to load 360Works_Email plug-in.
      "?" filed to initialize.
      I have installed JAVA for OS X from:
      https://support.apple.com/kb/DL1572?locale=en_US
      Re-downloaded the plug-in from and re-installed it:
      https://secure.360works.com/360Store/WebObjects/360Store.woa/wa/ProductDownload/EMAILPLUG
      Restarted FMPro15 Advanced - and receive the same error: "?" filed to initialize. 
      This is also happening to the ScriptMaster Plug-In.
      Grateful for any tips.
    • By liamob1
      Does anybody know a way of directly attaching a file to gmail (via the webclient) using mail to or via the send email functions. We have multiple users that move around the building so setting up outlook for each user is becoming a nightmare. They use iPads so the send mail script function works here, but on a desktop we would like it to force open GMail or use Mailto: and take the attachment with it. I've tried everything i know about mailto and i'm at a dead end. 
      I did think about trying to integrate google drive HOWEVER i have no experience with Googles API's. 
    • By Oyseka
      Hi All,
      I am trying to parse text from a Job Card Items table into the related Job Card and not getting the correct result.. as the Items in the Job Card are completed any anomalies have to be reported on the Job Card and with up to 50 items in the Job Card Items there may be more than one anomaly to report, (very rarely more than two) . If the Findings field is empty I am just inserting the Variables but when the field already contains data I am using this to parse the text:
      Position ( JobCard::Findings ; ":" ; 1 ; 1 )&¶ & $ProdName &" "& $ItemLocation & " " & $QItemSerial
      On the second insertion I am getting this:
      PR00023 FC iLLume Unit FC0000084 Unit damaged:46
      PR00023 FC iLLume Unit  FC0000084
       
      Where is the 46 coming from ?