Javascript can be used to evaluate expressions, as an alternative to performing the equivalent using a model. This makes sense in cases where the equivalent model (performing the same calculation) is complicated, or when the required functions are simply not available in the platform.
One example of the latter are trigonometric functions for which no templates are currently available (though this might change in the future), and so we can use javascript instead, as in the following example:
This will work on both client and server sides, and as always the tier is ultimately determined by the container. I.e. if the above is contained in a Service (at some higher level) than the javascript expression will be evaluated using rhino instead of the browser javascript engine.
Regards,
David
To use the full functionality of this web site, JavaScript needs to be turned on.
For best results, use the Firefox browser..
Copyright © 2003-2017 - Tersus Software Ltd., All rights reserved. Terms of Use License Graphic design by EmaraDesign