# Help with math expression

Wonderfull community here. I Searched this forum and can’t locate a solution. I am trying to create an expression that will calculate three variables within a set equation.
example:
“enter first number in text block”
“enter second number in text block”
“enter third number in text block”
“press calculate button”
(formula): num1 * num2 * num3 * 0.8 / 27 * 1.15 = label text box answer

any help will be greatly appreciated

Create your formula with math block , depending on your need . Then as items between the operation you have to add the block textbox.text that got the text value inside the textbox.
When you click on the button you have also introduce an if then else control
If textbox.text 1 is empty or textboxe.text 2 is empty or textbox.text is empty then show a message “you have to fill all the textboxes” else add the operation block

In settings about textbox in the design editor , you can set the value of the textbox and force them to get only number , so it will show only a number keyboard

Actually, you have the question … but unfortunately your answer is also the same.

Just use relevant component nd maths block

Num1 = numner1.text … like this

Thanks for the replies. I solved it with this method

You no need to use two extension for this simple work…

As said @Still-learning you don’t need extensions for easy math expression. Be careful about position of the blocks and how they will be connected.
I think yuo know that [(3x4x5)/5]x6 is different to (3x4x5)/(5x6)

1 Like

This method is working great. Thank you for this advice.
-Cheers-

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.