on 02-25-2010 3:02 PM
Hi All,
I working on validation of email field ,Suppose somebody enters email ID like this .
abc#@#xyz.com.
abc@#xyz.com I need to check for these # and throw an error .Could you please let me know on this.
Thanks,
Madhu
Hello Madhu
Use "Find" function
FIND(field name, "#") - return symbol position in string(field name)
Regards
Kanstantsin Chernichenka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kanstantsin Chernichenka,
Yeah that is fine but i need to check # symbol exists before @ symbol like #@ and @#,any of these case ,i need to error out.
I mean to say is # exists before at symbol and after at symbol .
Please let me know how can i validate . It like fat finger error .I sould not allow # symbol before or after @ symbol.
Thanks,
Madhu
Hi,
MID(FIELD NAME,FIND(FIELD NAME, "@")-1,1) Not Equal Operator "#" AND
MID(FIELD NAME,FIND(FIELD NAME, "@")+1,1) Not Equal Operator "#"
This will validate # should not come before and after @ symbol.
Select the Not Equal Operator from Operators Drop-down.
I tried it at my end, it is working fine.
Thanks and Regards,
Mandeep Saini
Hi,
Try this validation Expression
IF(ABS( ( ( FIND(XXXX, "@" ) ) - ( FIND ( XXXX, "#" ) ) ) ) Not Equal Operator "1", TRUE, FALSE)
Here, replace word "Not Equal operator" with the actual not equals operator by selecting from the operators list. I don;t know how to make it displayed in the post.
"XXXX" means you field where you want to put validation on. This will solve your requirement that # should not come just before or just after @ character. II tried it in my system. Check it and revert with the result.
Logic is pretty Simple. We are finding position of @ and # character in the XXXX field and if the difference in the position is not equal to "1", it means they are not together. In other case when it is equal to 1 error it out..
I am not fully aware of your business requirement, but feel you should put some more validations on this field like
1. @ or # should not be allowed more than once in the field.
2. Any special character other than permitted characters should not be allowed to enter in this field.
3. # or any special character (except ".") should not come after @.
etc...
Note:// Make sure Automatic execution property of this validation is set to Error, for capture error while saving a new record.
Best Regards,
Shiv
Edited by: Shiv Prashant Dixit on Feb 25, 2010 10:51 PM
Edited by: Shiv Prashant Dixit on Feb 26, 2010 12:40 AM
Shiv,
That conditon worked well for me ,but in ceratin condition when user copies and paste the email id in Portal that comes into MDM and MDM syndicates out to ECC but in ECC Idoc getting errored out with now we are having Idoc getting errored out with ’ and ‘,when send data from mdm to ECC .
Could you help me out how we can validate these hexdecimal values.
Thanks,
Madhu
Hi,
I would suggest to take help of some abap expert to debug and find out for what values it is getting errored out in ECC. then we can try to put validation in MDM accordingly to prevent those values from being entered.
-
I found that u2019 means left single quotation mark ( ' ) and u2018 means Right single Quotation Mark ( ' ). In the syndicator try by doing following changes in your map:
Go to "destination Items" Tab and select your destination Item which is giving you problem. Set Normalization property for this destination Item as "Custom Normalization Only" and specify Quotation Mark ( ' ) (without * as the custom character for normalization). Try it and I think it will resolve your problem. kindly revert with the result.
Regards,
Shiv
Edited by: Shiv Prashant Dixit on Feb 27, 2010 3:53 AM
Hi,
I could thought of this logic to throw error if there are more than 1 @ symbol in the Field.
IF(FIND(xxxx,"@",FIND(xxxx,"@")+1)=0,TRUE,FALSE)
Here, XXXX means your email ID field.
Logic is pretty Simple, we are checking for next occurrence of @ starting from first occurrence of @. if there is more than 1 @ then this outer Find will return some non zero number otherwise zero.
Regards,
Shiv
-
-
In my previous post in this thread
’ and ‘
has been replaced by quotation Mark ( ' ). this is making previous post confusing and misleading. So I am re-posting to make things clear :
"I found that
’
means left single quotation mark ( ' ) and
‘
means Right single Quotation Mark ( ' ). In the syndicator try by doing following changes in your map:
Go to "destination Items" Tab and select your destination Item which is giving you problem. Set Normalization property for this destination Item as "Custom Normalization Only" and specify Quotation Mark ( ' ) (without bracket as the custom character for normalization). Try it and revert with the result."
Regards,
Shiv
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.