ALPHA NUMERIC CHARACTERS ONLY

Having researched this a fair bit, I am coming up blank. I need way to only allow alpha numeric characters to be entered into a field. I am guessing some sort of Valid_If expression might help by enforcing any special characters to be deleted or changed. Who's the AppSheet brains that can help with this?

0 7 189
7 REPLIES 7

Please try in the valid_if of the column the following expression:

AND(ANY(EXTRACTEMAILS(CONCATENATE(SUBSTITUTE([_THIS]," ",""),"@removespecialincolumn.com")))= CONCATENATE(SUBSTITUTE([_THIS]," ",""),"@removespecialincolumn.com"),
NOT(CONTAINS([_THIS],"-")),
NOT(CONTAINS([_THIS],"_"))

)

Please test well.

It would help to identify the challenge if we would first know more details.. like how many characters or numbers the text can contain, what's the maximum? For example.. if the maximum characters amount is five, it's much shorter formula than if it's a long string.

Thanks @AleksiAlkio . I am needing a maximum of 20 characters that can only include A-Z and 0-9.

 

I am sure @AleksiAlkio will come up with a compact solution.

@James_Fussell1 : In the meantime , did you get a chance to test the solution I suggested. It basically makes use of EXTRACTEMAILS() function to discard the special characters. Since Emails can allow Hyphen(-) and underscore (_) , those are additionally added to check in teh expression.

The straight forward Valid_If expression I am currently using (below) works well, except it will not work for removing " or ' which is my problem. I have also tried CONTAINS([_THIS],TEXT(""")), but this doesn't work either. Any suggestions on this?

NOT(OR(
CONTAINS([_THIS],"#"),
CONTAINS([_THIS],"@"),
CONTAINS([_THIS],"$"),
CONTAINS([_THIS],"%"),
CONTAINS([_THIS],"&"),
CONTAINS([_THIS],"*"),
CONTAINS([_THIS],"("),
CONTAINS([_THIS],")"),
CONTAINS([_THIS],"+"),
CONTAINS([_THIS],"?"),
CONTAINS([_THIS],"/"),
CONTAINS([_THIS],"|"),
CONTAINS([_THIS],","),
CONTAINS([_THIS],"!")
))

If I remember you need to write the trick like.. RIGHT("A'",1)

Top Labels in this Space