runScript in SQLTag

I am trying to use the runScript() function as the expression defining a tag value. I get this error (sent to you in full).

Error parsing expression: Parse error: Function 'runScript' is not defined.

What’s up? Can I use this function here?

Nope, you can’t use runScript() in a tag expression. SQLTag expressions are evaluated by FactorySQL - which doesn’t have the Jython scripting engine.

Here’s the script I want to execute.

power = some polynomial using a single input value WS if WS is less than 4: power = 0.0 if WS is greater than 25: power = 0.0

I can probably figure out embedded ‘if’ statements to do this in a tag, but is there a cleaner way that you can think of? Will ‘if’ statements work here?

Thanks.

I think its just an expression like this:

if ({WS} < 4 || {WS} > 25, 0.0, polynomialOfWS)

Indeed. Thanks.