I am trying to convert a character from one field to a different character in another field.
I have two fields, Code and Answer.
Answer is a calculation type. Here is the calculation I am trying to use.
If(Code = "a" ; "r" ; 0)
So now if I put an a in the Code field, Answer should have an r in it. That does work.
But if I put an A in the Code field, Answer still puts an r in the field.
So I tried this: If(Code = Char(97) ; "r" ; 0) same result.
My question is, why won't filemaker distinguish between the upper and lower case a? By using the Char function, that should be as exact as it gets. Am I missing something?
Am I missing something?
"A" = Char (97)
returns true, because Char (97) = "a" and
"A" = "a"
also returns true. Use the Exact() function to make the comparison case-sensitive.
BTW, it seems you'd be better off using Substitute() instead of If() - but I am not really sure what's your purpose here.