cancel
Showing results for 
Search instead for 
Did you mean: 

Validation on double quote (")

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi Mandeep, thanks for the reply.

In this way the whole fields must be alphabetic characters?

Unfortunately, the validation must also allow numbers and other characters like comma and space. Is there a way?

Br, Olof

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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)

http://www.ascii-code.com/

Then do the validation as:

NOT HAS_ANY_CHARS(my field,"34", "34")

Best Regards

Olof