on 03-07-2011 10:06 AM
Hi,
This is probably quite simple, but I am not able to make the following to work.
I would like to write a validation that checks for double quote characters, i.e:
NOT HAS_ANY_CHARS(my field, "%", "\"")
I guess the question is how I can escape the double quote?
Br, Olof
Hi Olof,
I would like to write a validation that checks for double quote characters
Unfortunately, We don't have direct way to achieve this special character "double quote characters" requirement.
But you can write in this way if you want all chars to be Alphabets only.
HAS_ALL_CHARS(my field, "A" , "z" )
So in this way, it will allows only Alphabets only and give error in case of all special characters including double quote.
Kindly revert if you need any other input.
Regards,
Mandeep Saini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Olof,
Unfortunately, the validation must also allow numbers and other characters like comma and space. Is there a way?
Yes, there is a way.
Please try below expression which will allow only Alphabets, Numbers, space and comma.
HAS_ALL_CHARS(my field, "A", "z") OR HAS_ALL_CHARS(my field, "0", "9") OR
FIND(my field, " ") OR FIND(my field, ",")
Regards,
Mandeep Saini
I see,
The problem is that "my field" could be a value like ABC123. With the above validation it must be either all numbers or all characters, but I need to allow for both in the same field.
So I guess there is no other way. I will look into another solution.
Thank you for helping out.
Best Regards
Olof
I did find a way to do a validation on a double quote (")
Look at the acsii character code for double quote (in this case double quote = 34)
Then do the validation as:
NOT HAS_ANY_CHARS(my field,"34", "34")
Best Regards
Olof
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.