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
Name check
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 247
- Joined: Thu Apr 27, 2006 6:38 am
- Location: Hyderabad
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 247
- Joined: Thu Apr 27, 2006 6:38 am
- Location: Hyderabad