Page 1 of 1
Space in e-mail address
Posted: Mon Mar 21, 2005 11:16 am
by Radha_(Guest)
I would like to check for the following in an e-mail address.____1. "@" sign__2. "." sign__3. Blank space in the address.____Kathleen has shown me the way to check for the @ sign as well as ".".____But how do I check for a blank space in an email address? ____Or on the whole how do I check for a "2", "." and a blank sign in an e-mail address.____Your immediate response is much appreciated.____Radha
=> RE: Space in e-mail address
Posted: Mon Mar 21, 2005 3:25 pm
by Alan_Klein
You should be able to check for a space in the same way as anything else, by enclosing a space in quotation marks.
==> RE: Space in e-mail address
Posted: Mon Mar 21, 2005 9:31 pm
by Radha_(Guest)
That is where something goes wrong.____Supposing my e-mail address is abcde@hotmail.com and I enter an e-mail address as:____abcde@hot mail.com in a field which has a max length of 20 characters, I am able to check for "@" and "." but the formula does not check for the space.____Even if I have the correct e-mail address without any spaces in between the formula brings it up as an invalid e-mail address.____IIF(^@^$email or ^.^$email,^Valid email^,^Invalid^) is the formula I am using.____Further if I include the space it will look like:____IIF(^@^$email or ^.^$email or not ^ ^$email,^Valid email^,^Invalid^)____Will this work is my question?____Regards__Radha
===> RE: Space in e-mail address
Posted: Tue Mar 22, 2005 8:36 am
by kfleming
Try:__IIF(^ ^$email,^Invalid^,IIF(^@^$email or ^.^$email ,^Valid email^,^Invalid^))____So first you test for the blank and if it passes that test you then look for the @ or .____Kathleen__R&R Support
====> RE: Space in e-mail address
Posted: Wed Mar 23, 2005 11:05 pm
by Radha_(Guest)
Kathleen,____Thanks.____It still does not do one thing for me.____If my e-mail address is for example radhak@hotmail.com and it is entered as radhak@ hotmail. com then I need the system to identify it as a error as there are blanks in-between @ and hotmail and between . and com.____Your formula works in order to check and see whether the e-mail field is blank and if not blank whether it contains a @ and .____Would appreciate if you could let me know______Thanks and Regards__
=====> RE: Space in e-mail address
Posted: Thu Mar 24, 2005 1:12 am
by Alan_Klein
Try IIF(^ ^$EMail,^Invalid^,IIF(not ^@^$EMail or not ^.^$EMail,^Invalid^,^Valid E-Mail^))
======> RE: Space in e-mail address
Posted: Thu Mar 24, 2005 7:01 am
by Radha_(Guest)
Thanks.____But, What I am trying to do here is that to check the validity of an e-mail address.____If the e-mail address does not have "@", "." or has both the "@" and "." but has a space within the e-mail address, then I want it to be printed on a report.____What you have given me does not do that. This is what my problem.____Would appreciate if any one could help me out on this.
=======> RE: Space in e-mail address
Posted: Thu Mar 24, 2005 8:48 am
by kfleming
Does this work correctly for you?____C:UserFilesRadhaemail.dbf__Printed: 03/24/200507:46____Expression of Test:__IIF(^ ^$trim(ltrim(email)),^Invalid^,IIF(^@^$email and ^.^$email ,^Valid email^,^Invalid^))____EMAIL Test__livesupport@livewarepub.com Valid email__this is a test Invalid__radhak@ hotmail. com Invalid__radhak@ hotmail.com Invalid__@. Valid email__radhakathotmail.com Invalid____ Records printed: 6
========> RE: Space in e-mail address
Posted: Thu Mar 24, 2005 1:07 pm
by Radha_(Guest)
Kathleen,____Perfect and thanks.____But, I need to also see that only "@"and"." in the email address without any preceding or succeding characters to be made invalid.____Like your example @. sgould be an invalid e-mail address. In your example that comes up as a valid e-mail address.____If you could show me how I could eliminate that , your solution would be perfect.____Thanks once again.____Radha
=========> RE: Space in e-mail address
Posted: Thu Mar 24, 2005 4:36 pm
by kfleming
Try:__IIF(^ ^$trim(ltrim(email)),^Invalid^,IIF(at("@",email)>1 and at(".",email)>at("@",email)+1 ,^Valid email^,^Invalid^))______Kathleen__R&R Support