Execute string expression at runtime

Execute string expression at runtime

  
Hi,

Suppose I have on a database table an entity value field with formulas:

ID  |  Name  |  Formula
1   |  c          |  a + b
2   |  x          |  p + " " + t + " " + o

Is there some way to have in the eSpace some variables with the same names (a, b, c, x, ...) and execute the expression (formula) at runtime?

Example:
In the eSpace, a="bom" and b="dia". From the database, I see that c = a + b. I would like to calculate that c = "bom dia".

Is there any native way to do this on Outsystems, or do I need some extension to do this?
Hi Ricardo,

You won't be able to do it natively, as you will retreive that column from the database, as a string, and there is no direct way to convert it to an expression (at least that I know of).

You can either parse the string and do a traditional find and replace, or eventualy use javascript to achieve what you want and directly inject that column value as a javascript unescaped expression.