cancel
Showing results for 
Search instead for 
Did you mean: 

Validation - Field value should not contain any character

former_member206107
Active Participant
0 Kudos

Hi,

Can any one help me in framing a validation expression for the scenario where the field value should not contain any character.

eg: 234a - error condition

2345 - valid value

Thanks in advance.

Cheers,

Arun Prabhu S

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arun,

TRY THIS, IT MUSTWORK:

IF(HAS_ANY_CHARS(MATERIAL NO, "A" , "Z" )OR HAS_ANY_CHARS(MATERIAL NO, "a","z"), FALSE, TRUE)

WHERE MATERIAL NO = FIELD ON WHICH YOU LIKE TO PERFORM VALIDATION

REWARDS IF USEFUL,,,,,

MANDEEP SAINI

Former Member
0 Kudos

Hi,

There are two ways

1. Make the field as Type Integer

2. Validation Expression HAS_ALL_CHARS(MaterialNumber,0,9)

Regards,

Jitesh Talreja

Answers (3)

Answers (3)

former_member206107
Active Participant
0 Kudos

Thanks for your time and useful helps.:-)

Former Member
0 Kudos

Hi Arun

Try this;

S1= FIND(field name,"1")AND FIND(field name,"2")AND.................FIND(field name,"9")

this will give output 0 if 1 is not there in string or return the position of 1 found in string. Non zero values is TRUE and 0 is False. then you need to put some logical statement to convert false output as true.

it may solve your requirement

regards-

Ravi

Former Member
0 Kudos

Hello,

And if ur field is of type Text then try below logic:

NOT(HAS_ANY_CHARS(Age,"A","Z") OR HAS_ANY_CHARS(Age,"a","z"))

where Age is my field.

Thanks,

Mahi

Former Member
0 Kudos

Hello Arun,

if field is of type Integer then there is no need of Validation expression.

In Import manager & Data manager it wont accept char values

Thanks,

Mahi