I was doing an example with a 3rd order polynomial as while you can get a trendline for this in view you can't access the underlying equation in order to use it for predictions. I've attached a QVW of what I've done which works fine (see image below).
The issue is that when I get the result back from python it's in an array and so you'll see in the app that I fetch each coefficient and place it in a variable and then use those variables in my expression. This is pretty inefficient though because I have to call python for each coefficient.
I then tried joining all of the outputs in the array into a single string but the SSE wasn't happy with this as I was using ScriptAggr. If I switch to ScriptAggrStr, it also fails because it wants the inputs to be strings.
Is there not a better way to do this than what I'm doing now? i.e. pass in two columns and then make a 3rd order polynomial prediction?