Re: Question on filters
:) Well, not any link that directly relates to the escapes....but Tom Cone's filtering explanations were of great use when learning the syntax--found in the help file here.... http://support.alphasoftware.com/alp...TABLESUM().htm
Just know that either a single quote ' or a backslash \ can be used to make what follows a literal character (which means that say a double quote " is normally used to encapsulate an entire phrase can instead be made to be just a double quote... or in the case of a filter, an escape character will make that double quote simply that...a double quote within the necessary outer double quotes).
I prefer the backslash as it is different enough from the double quote that I can read an expression much easier then. Another way that sometimes is necessary, is to use chr(92) instead of the \ as Alpha can get confused expecially when using 3 or four backslashes in a row--some to have a literal backslash included followed by a literal doublequote....such as
"\\\"" which when evaluated should give \" as the end result.....sometimes it chokes Alpha. Easy cure is to use chr(92)+"\"" or even chr(92)+chr(34)
Edit--another example: say a filter was needed that used isnotblank("some_field"). the filter would have to make the existing, necessary double quotes literal such as
Not a definitive narration, but maybe will give some insight as to how an escape character works.
:) Well, not any link that directly relates to the escapes....but Tom Cone's filtering explanations were of great use when learning the syntax--found in the help file here.... http://support.alphasoftware.com/alp...TABLESUM().htm
Just know that either a single quote ' or a backslash \ can be used to make what follows a literal character (which means that say a double quote " is normally used to encapsulate an entire phrase can instead be made to be just a double quote... or in the case of a filter, an escape character will make that double quote simply that...a double quote within the necessary outer double quotes).
I prefer the backslash as it is different enough from the double quote that I can read an expression much easier then. Another way that sometimes is necessary, is to use chr(92) instead of the \ as Alpha can get confused expecially when using 3 or four backslashes in a row--some to have a literal backslash included followed by a literal doublequote....such as
"\\\"" which when evaluated should give \" as the end result.....sometimes it chokes Alpha. Easy cure is to use chr(92)+"\"" or even chr(92)+chr(34)
Edit--another example: say a filter was needed that used isnotblank("some_field"). the filter would have to make the existing, necessary double quotes literal such as
Code:
Your_Filter = "isnotblank(\"some_field\")"
Comment