|
Using Functions and Operators |
The [addcalc] and [depends] short codes, as well as the calc=xxx short code option, are evaluated by the browser, which means the code must be in JavaScript.
To make it easier to use, some PxPlus system functions (see Webster+ Calculations) and PxPlus comparison operators (=, <>, =<, =>, and, or) are supported in JavaScript. For these short codes and short code option, PxPlus includes logic that automatically converts them to JavaScript.
Example:
[depends "cvs(lcs(Country$)<>"canada" and lcs(Country$)<>"u.s.","ASCII:HTML")" disable=TAX invert]
In this example, to allow spaces, the code is surrounded in quotes. The code is also converted to HTML, so HTML special characters, including quotes, are handled.
The [if] short code is different in that it is evaluated by the server and allows PxPlus code.