Ocean West Posted August 17, 2014 Posted August 17, 2014 it seems that the form of email can't be guaranteed as emails could take the form: User Name<[email protected]> or just [email protected] it would be nice if there was a function that would parse out the single email from the field or a return separated list ( unique or all ) of emails from the message received. i've done it in tandem with script master but in this case client didn't want to deploy a second plugin currently i am left with trying to parse things out, just not elegant or efficient.
ggt667 Posted August 19, 2014 Posted August 19, 2014 it seems that the form of email can't be guaranteed as emails could take the form: User Name<[email protected]> or just [email protected] it would be nice if there was a function that would parse out the single email from the field or a return separated list ( unique or all ) of emails from the message received. A custom function taking the parameter i; as input, could look something like this; the basic logic is in place, --- Case( PatternCount( i; "<" ) = 1 and PatternCount( i; ">" ) = 1; Case( PatternCount( i; "@" ) = 1; Middle ( i; Position ( i; "<"; 0; 1 ) + 1; Position ( i; ">"; 0; 1 ) - Position ( i; "<"; 0; 1 ) - 1 ); 0 ) ) & Case( PatternCount( i; "@" ) = 1 and PatternCount( i; "<" ) = 0 and PatternCount( i; ">" ) = 0; Trim( i ) ) --- but could be able to abbreviate a bit, this function would go for 1 - one email address, --- Case( PatternCount( i; "@" ) = 1; Case( PatternCount( i; "<" ) = 1 and PatternCount( i; ">" ) = 1; Middle ( i; Position ( i; "<"; 0; 1 ) + 1; Position ( i; ">"; 0; 1 ) - Position ( i; "<"; 0; 1 ) - 1 ); Case( PatternCount( i; "<" ) = 0 and PatternCount( i; ">" ) = 0; Trim( i ) ) ) ) --- if you would like to have several email addresses parsed in one go, you would have to split by "," yet FileMaker does not do split and join too nicely hence keeping the addresses on each their record, might be just as nice to work with in FileMaker.
Recommended Posts
This topic is 3749 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now