Page 1 of 1

Name check

Posted: Sun Jul 20, 2008 9:15 pm
by devidotcom
Hi All,

I have a small check to be done on the customer name column (Cust_Name) to term it a valid name value.

This column can have
1. Only letters in upcase (A-Z)
2. Numbers (0-9)
3. Can contain only these values (& . ,)

What is best way we can handle this.

Please let me know.

Thanks
Devi

Posted: Sun Jul 20, 2008 10:48 pm
by ray.wurlod
Convert all the valid characters to "" using a single Convert() function then test using Len() function to determine whether anything remains. The following expression is true if TheField contains a valid value, false if not.

Code: Select all

Len(Convert("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ&.,","",InLink.TheField)) = 0

Posted: Mon Jul 21, 2008 4:09 am
by devidotcom
Thank you Ray.