1 of 1 people found this helpful
"However, from my understanding the escape character removes both itself and the character that immediately follows it from whatever is being evaluated. "
This is where your confusion comes from. This statement is not correct. The escape causes FileMaker not to process the following character as part of the expression, but merely to pass it through directly. So in your example, it tells FileMaker, "Don't treat the double quote as the beginning / end of a text string; rather, just pass it directly through as a double quote."
Why does that matter? Because Evaluate processes its parameter as though it were a calculation expression. The catch is, its parameter has to be a legitimate text string. So it has to be a field, variable, or combination of field(s), variable(s), and text string(s) properly formatted. So, if I write:
"2 * 5"
Evaluate treats this as the expression
2 * 5
and calculates it as a mathematical expression. If I write:
"\"2 * 5\""
Evaluate treats this as a literal text string. In similar fashion, if I were to write:
"$foo = 2 * 5"
Evaluate would set the variable $foo equal to 10. If I write:
"$foo = \"2 * 5\""
Evaluate would set the variable $foo equal to the text string "2 * 5" (without the quotes).
Hope that helps.
Thanks for your quick reply, Mike. The key sentence for me is "just pass it directly through as a double quote" ... this explains it!