Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Check if text = alpha (A...Z) only problem.


nangko

Recommended Posts

I have to validate if an dutch zipcode is correct.

The last 2 Characters should be alpha (A...Z) only.

No numbers or other characters like: &*(#$&(

 

I hoped that FM had a function like GetAsAlpha( ), but FM doesn't.

I can check for numbers with GetAsNumber ( ) But than I don't know how to check for other characters like ."@#!(@

 

I hope some one has a solution. It would make my app much more user friendly.

 

Thanks in advance

Link to comment
Share on other sites

never mind, sorry

Sorry?

I found your original post in my mailbox and the filter() function in your post does the trick for me:

 

length (filter ( alpha ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") )= 2

 

Length (Filter ( Right ( TrimAll ( adress1zipcode ; 1 ; 3 ) ; 2 ) ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") )= 2

 

Thanks!

It really helps me to be more sure that the "KIX-CODE" (dutch postal barcode)

I create is correct.

Link to comment
Share on other sites

The above only works if you know with what kind of length you are working with.

So with a variable length you can do this:

 

length (filter ( alpha ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvw xyz") )= length ( alpha)

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use