Create an Expression Tag from a string?

Interesting question and I didn't expect it to be possible.

I tried a quick tag binding from a Text Field component to [default]ExpressionTag.Expression and it updates and works. You should be able to write it from a script.

I'd be very, very careful with giving the users this ability. It opens up the possibility to do the equivalent of SQL injection via your tags. I would be inclined to give them a dialog, let them choose tags and operators from dropdowns and then sanitise the operation before writing it to the tag's expression.

1 Like