I need to convert a string representing a numeric expression into its corresponding result. In the same way by when in an excel cell you enter "2+2*4" and the result is 10.
EVALUATE Function not work. Need for a 'numerical' string and does not calculate expressions and I cannot use DLL.
Cannot find a solution.
I had thought of using a javascript function like this by inserting it in a controlladdin:
function convert(expression){
return eval(expression);
}
It's possible use the function in a codeunit procedure?
Someone can show me an example?
Are there better solutions?
0
Answers
i.e.:
curl --location 'http://api.mathjs.org/v4/' \
--header 'Content-Type: application/json' \
--data '{
"expr": "a = 1.2 * (2 + 4.55)","precision": 20
}'
HiJJMc,
I believe it is not a good idea to use a free service in production. If for some reason it is no longer available?
Hi AlexDen,
dotnet is not an option on cloud