I'm trying MapServer's run-time substitution to dynamically set my Mapfile's CLASS EXPRESSION values.
The expressions take the form of:
CLASS EXPRESSION (([my_attr_col] >= num_1) && ([my_attr_col] < num_2)) ... END
When manually setting the expression values (not using run-time substitution) it works. (And only seems to do so when I use no quotes at all.)
When trying to pass the expression in dynamically with run-time substitution, then I add a VALIDATION block:
VALIDATION 'my_attr' '^[\s\S]*$' END
and I modify the CLASS EXPRESSIONs along these lines:
CLASS EXPRESSION '%my_attr%' ... END
and I then append and send the information via the query URL.
However, I get this error:
msEvalExpression(): General error message. Cannot evaluate expression, no item index defined.
I've tried many permutations of quotes and regex filtering but I can't seem to figure out what would be accepted by MapServer.