cancel
Showing results for 
Search instead for 
Did you mean: 

How to formula that comes in an string ?

vominhtam
Participant
0 Kudos

Hi expert,

Does anybody know how to process a formula that comes in an string?

For example:

a = 1. b = 2. c = 3.

string = '( a + b ) * c'. ....

string = '( 1 + 2 ) * 3'.

How can I get the result of that formula ?

Thanks in advance.

Accepted Solutions (0)

Answers (2)

Answers (2)

vominhtam
Participant
0 Kudos

Hi John Meadows,

Thanks for suggesting me. I code in Cloud Application studio.

As per example,

var result = "(1+2)*3"

Expected result is result = 9 not result = "(1+2)*3"

Because I have a field with dynamic formula, I want get the result when field formula changed.

JohnMeadows
Product and Topic Expert
Product and Topic Expert
0 Kudos

do you mean how to code this in Cloud Application studio?

it is fairly simple

var a=1;

var b=2;

var c=3;

var result = (a + b)*c;

var string = result.ToString();

John